Jan-11-2023, 12:03 PM
I have two child classes;
Both are children of the main, parent, class,
[inline]
graph_frame.change_graph(self, graph = self.radio_button_var)
NameError: name 'graph_frame' is not defined
[/inline]
I believe I need to direct it back to the parent object, but how?
GraphSelect
and GraphCreate
.Both are children of the main, parent, class,
App
.[inline]GrapgCreate
[/inline] has a method...def change_graph(self, graph): if (graph == "G5"): self.cm_graph(sa_sun, t_sun) else: self.default_graph()
GraphSelect
has (currently) radio buttons that, when selected, run one of it's own methods...def selection(self): graph_frame.change_graph(graph = self.radio_button_var)The parent class (
App
) creates an instance of GraphFrame
, called graph_frame
...self.graph_frame = GraphFrame(self, header_name="Graph Section")However, when I run this I get...
[inline]
graph_frame.change_graph(self, graph = self.radio_button_var)
NameError: name 'graph_frame' is not defined
[/inline]
I believe I need to direct it back to the parent object, but how?