所以我有类似于这个设置的东西:
class FrameBase(tk.Tk):
def __init__(self,*args,**kwargs)
## Create 3 windows, the front, settings and the function
class Front(tk.Frame):
def __init__(self,parent,control):
## Has buttons to navigate between settings and the function
我的问题是,在 init 解析了一次之后,我的函数不会更新从settings-Class中获取的值。他们目前的沟通方式大致如下:
class Front(tk.Frame):
def __init(self,parent,control):
settings = Settings(self, self) ## (self, self) required because of the infrastructure as far as I can tell.
## It does bring the setting values fine so that's not a problem in and of itself.
settingvalues = settings.bring_settings()
def magic()
#Does magic based on the settingvalues
class Settings(tk.Frame):
def __init(self,parent,control):
# user can change settings
def bring_settings(self):
# return setting values
问题在于,基本上我不知道如何在每次更改设置,打开功能窗口或每隔x个间隔(这可能是这个时间间隔)时发出功能请求/获取设置值最重?)