> -----Original Message----- > From: [email protected] On Behalf Of Chris Nelson > Sent: 29 November 2011 16:36 > To: [email protected] > Subject: [Trac] Issue with ExtensionOption > > In Trac 0.11.6, if I do: > > class Foo(): > myThing = ExtensionOption('myCfg', 'myOpt', IMine, > 'MyInstance') > > def __init__(self): > self.env.log.info("I'm active") > > def someMethod(self): > myThing.bar() > > all is well but if I do: > > class Foo(): > myThing = None > > def __init__(self): > self.myThing = ExtensionOption('myCfg', 'myOpt', IMine, > 'MyInstance') > self.env.log.info("I'm active") > > def someMethod(self): > myThing.bar()
...at a guess I would say you are missing a `self.` there? ~ mark c > I get an error that class ExtensionOption has no method bar. > Why does it matter what context I call ExetnsionOption() in? > > Chris > -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
