You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to separate the GUI and, I guess for a lack of a better term, the non-GUI parts of FASLR. A large part of this is already achieved via the chainladder package, but other behavior, such as loading and keeping track of models, indexes, and database operations should also be separated from the GUI classes.
I have decided to move these things into something called the "FASLR Core" but I'm not sure exactly how to implement this in Python. I had tried creating a separate class (FCore) but struggled when I had to pass an instance of this class to objects deep within the GUI, such as a button nested within several layers of widgets.
One solution is to go up the Python hierarchy and use a whole module as the core instead:
This way, all we have to do is import the module when we need it, rather than passing an object instance as an argument through several layers of GUI classes.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I would like to separate the GUI and, I guess for a lack of a better term, the non-GUI parts of FASLR. A large part of this is already achieved via the chainladder package, but other behavior, such as loading and keeping track of models, indexes, and database operations should also be separated from the GUI classes.
I have decided to move these things into something called the "FASLR Core" but I'm not sure exactly how to implement this in Python. I had tried creating a separate class (FCore) but struggled when I had to pass an instance of this class to objects deep within the GUI, such as a button nested within several layers of widgets.
One solution is to go up the Python hierarchy and use a whole module as the core instead:
https://stackoverflow.com/questions/20888809/accessing-class-instance-from-another-module-python
This way, all we have to do is import the module when we need it, rather than passing an object instance as an argument through several layers of GUI classes.
Beta Was this translation helpful? Give feedback.
All reactions