calling a class method from a menu in a different class
chare at labr.net
Tue Aug 3 13:30:56 CEST 2010
Oh and Risk,
I know I was calling the class object.
class 1 creates the instance object
class 2 tries to use the instance object
so the problem is how to make class 2 knowledgable of instance object? I guess I could pass the instance object into the class, since class1 creates the instance and also calls class 2.
On Aug 2, 2010, at 10:31 PM, rantingrick wrote:
> It looks as if you are calling a class object and not an instance
> object. However i cannot be for sure because you are using improper
> Python style. All classes should be capwords. But here again you have
> used camelcase for the class identifiers "radarWidgets" and
> "mainDisplay", which is bad bad bad!!
> You been asking multiple questions about this code for the last couple
> of days (and thats fine). However, maybe you would do everyone a favor
> by posting the entire code so we can offer suggestions. Just seeing
> seeing a snipit here and a snipit there is not helping because we
> don't know where else you may be screwing up that we cannot see.
> It seems you're committing many faux pas with not only your coding
> style but also your coding practices. I've seen overuse of globals and
> bad styles and on and on. So post the entire code so myself and others
> can go through this mess and get it sorted out. If you keep on with
> your bad habits you're never going to become proficient with Python.
> I am sorry if this post seems condescending because that is not the
More information about the Python-list