Hi, Say I've got two objects: class MyFolder(OFS.Folder.Folder,ExtensionClass.Base): def __init__(self,language): self.id = language self.language = language and below that one in the zope hierachy, a: class MyText(Acquisition.Implicit, OFS.SimpleItem.Item, Persistent, AccessControl.Role.RoleManager): def foo(self): return self.language howcome foo() fails to return the language-value? If I use the property sheet in zope to add a "language" property, it works fine. best regards, Jacob
Hi Jacob, if you want 'foo' to be publishable it needs a comment string... what error did you get? -steve ---------------------------------------------------------------------- Hi, Say I've got two objects: class MyFolder(OFS.Folder.Folder,ExtensionClass.Base): def __init__(self,language): self.id = language self.language = language and below that one in the zope hierachy, a: class MyText(Acquisition.Implicit, OFS.SimpleItem.Item, Persistent, AccessControl.Role.RoleManager): def foo(self): return self.language howcome foo() fails to return the language-value? If I use the property sheet in zope to add a "language" property, it works fine. best regards, Jacob _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
On Tue, 8 Feb 2000, Steve Spicklemire wrote:
if you want 'foo' to be publishable it needs a comment string...
Not a comment - docstring. That how it is called. Oleg. ---- Oleg Broytmann Foundation for Effective Policies phd@phd.russ.ru Programmers don't die, they just GOSUB without RETURN.
Steve Spicklemire wrote:
Hi Jacob,
if you want 'foo' to be publishable it needs a comment string... what error did you get?
Hi Steve, I do not want foo to be publishable, I want language to be aqcuisitionable from MyFolder (parent) to MyText (child). I get an attributerrror. best, Jacob
On Tue, 8 Feb 2000, Jacob Gorm Hansen wrote:
Steve Spicklemire wrote:
Hi Jacob,
if you want 'foo' to be publishable it needs a comment string... what error did you get?
Hi Steve,
I do not want foo to be publishable, I want language to be aqcuisitionable from MyFolder (parent) to MyText (child).
Out of curiosity, is child actually an attribute of parent? In other words, is parent.child a valid expression?
I get an attributerrror.
For us to really tell what is going on we need to see how you have composed your class instances in Zope (ie. where did you put the instances in your OFS?) Acquisition depends too much on where things are in the ODB for me to help without that information.
best, Jacob
--Jeff --- Jeff K. Hoffman 704.849.0731 x108 Chief Technology Officer mailto:jeff@goingv.com Going Virtual, L.L.C. http://www.goingv.com/
"Jeff K. Hoffman" wrote:
Out of curiosity, is child actually an attribute of parent? In other words, is parent.child a valid expression?
For us to really tell what is going on we need to see how you have composed your class instances in Zope (ie. where did you put the instances in your OFS?) Acquisition depends too much on where things are in the ODB for me to help without that information.
Hmm, the child is contained within the parent, or at least placed directly below it in the Zope-admin tree. I would like it work for whole subtrees though. Like defining a property on the top level does. Hope you can help, Jacob
participants (4)
-
Jacob Gorm Hansen -
Jeff K. Hoffman -
Oleg Broytmann -
Steve Spicklemire