On 11/29/2011 11:39 AM, Cooke, Mark wrote:
-----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?
Sorry. Sloppy example. What I actually have is like
def someMethod(self):
self.myThing.bar()
And self.myThing is resolved but seems to be an ExtensionPoint object
because Trac complains that Extension point has no bar() method.
--
Christopher Nelson, Software Engineering Manager
SIXNET - Solutions for Your Industrial Networking Challenges
331 Ushers Road, Ballston Lake, NY 12019
Tel: +1.518.877.5173, Fax: +1.518.877.8346 www.sixnet.com
--
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.