import wx from views.MainFrame import MainFrame class Controller: def __init__(self, mainFrame: MainFrame): self.mainFrame = mainFrame self.mainFrame.Bind(wx.EVT_BUTTON, self.onClickGomb1, self.mainFrame.button1) def onClickGomb1(self, event): numStr = self.mainFrame.entry.GetValue() product = int(numStr) * 2 self.mainFrame.entry.SetValue(str(product))