I'm doing an experiment... If I add more '!' and '?' marks will I get a response. Soon with enough experimentation I can find the optimal number and frequency of variation. I want to inherit the properties of one zclass in another zclass, but it seems to cause some namespace clashing... shouldn't this be possible? Working with the instance of the class is fine, but inter-zclass inheritance (acquisition?) would be nice... Cool feature? Am I missing something? Thanks, Alex. 1010011010101001101010100110101010011010 0 Digital Garage デジタル車庫 :) 1 Alexander Schonfeld 0 alex@garage.co.jp - pear - 03-5454-7219 1 http://www.zope.ne.jp/ http://www.garage.co.jp
I guess I can just use dtml methods that return lists and stuff, but is that as cool? On Wed, 18 Oct 2000 18:21:33 +0900 Alexander Schonfeld <alex@garage.co.jp> wrote:
I'm doing an experiment... If I add more '!' and '?' marks will I get a response. Soon with enough experimentation I can find the optimal number and frequency of variation.
I want to inherit the properties of one zclass in another zclass, but it seems to cause some namespace clashing... shouldn't this be possible? Working with the instance of the class is fine, but inter-zclass inheritance (acquisition?) would be nice...
Cool feature?
Am I missing something? Thanks,
Alex.
1010011010101001101010100110101010011010 0 Digital Garage デジタル車庫 :) 1 Alexander Schonfeld 0 alex@garage.co.jp - pear - 03-5454-7219 1 http://www.zope.ne.jp/ http://www.garage.co.jp
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
1010011010101001101010100110101010011010 0 Digital Garage デジタル車庫 :) 1 Alexander Schonfeld 0 alex@garage.co.jp - pear - 03-5454-7219 1 http://www.zope.ne.jp/ http://www.garage.co.jp
AFAIK (but I'm no expert), a ZClass inherits its parents' propertysheets and you can access them in the normal way. The problem is that the all the propertysheets have to have different names. Example: If your parent class and the child class both have a property sheet called "Basic", but the child class is hoping to inherit someproperty from the parent class: ParentClass.Propertysheets.Basic.someproperty is ok, but ChildClass.Propertysheets.Basic.someproperty won't work, because "someproperty" is not in ChildClass's "Basic" propertysheet. If your parent class and child class do not share propertysheets with the same name, you *can* access parent properties: ChildClass.Propertysheets.ChildSheet.anotherproperty ChildClass.Propertysheets.Basic.someproperty will both work. If I'm correct, this is all wrong and a bad thing, surely? However that was the worst-explained thing I've ever been responsible for and it's probably wrong. That particular configuration of punctuation in the subject header just struck a chord with me... seb.
-----Original Message----- From: zope-dev-admin@zope.org [mailto:zope-dev-admin@zope.org]On Behalf Of Alexander Schonfeld Sent: 18 October 2000 10:25 To: zope-dev@zope.org Subject: Re: [Zope-dev] Inheritable Propertysheets!???!!?!?!?!!
I guess I can just use dtml methods that return lists and stuff, but is that as cool?
On Wed, 18 Oct 2000 18:21:33 +0900 Alexander Schonfeld <alex@garage.co.jp> wrote:
I'm doing an experiment... If I add more '!' and '?' marks will I get a response. Soon with enough experimentation I can find the optimal number and frequency of variation.
I want to inherit the properties of one zclass in another zclass, but it seems to cause some namespace clashing... shouldn't this be possible? Working with the instance of the class is fine, but inter-zclass inheritance (acquisition?) would be nice...
Cool feature?
Am I missing something? Thanks,
Alex.
1010011010101001101010100110101010011010 0 Digital Garage デジタル車庫 :) 1 Alexander Schonfeld 0 alex@garage.co.jp - pear - 03-5454-7219 1 http://www.zope.ne.jp/ http://www.garage.co.jp
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
1010011010101001101010100110101010011010 0 Digital Garage デジタル車庫 :) 1 Alexander Schonfeld 0 alex@garage.co.jp - pear - 03-5454-7219 1 http://www.zope.ne.jp/ http://www.garage.co.jp
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Thanks, that does seem to do the trick. :) Much appreciation!! I added a propertysheets like this: ParentClass.Propertysheet.defaultProps.someprop ChildClass1.Propertyshoot.props.someprop ChildClass2.Propertyshoot.props.someprop (to override the parent's default when needed) It sees the ChildClass' "someprop" first so it doesn't go look for the parent's prop. This is useful for making lots of classes with only a few changed properties, but the bulk of which can be inherited. Alex. On Wed, 18 Oct 2000 10:50:44 +0100 "Seb Bacon" <sebbacon@email.com> wrote:
AFAIK (but I'm no expert), a ZClass inherits its parents' propertysheets and you can access them in the normal way. The problem is that the all the propertysheets have to have different names. Example:
If your parent class and the child class both have a property sheet called "Basic", but the child class is hoping to inherit someproperty from the parent class:
ParentClass.Propertysheets.Basic.someproperty
is ok, but
ChildClass.Propertysheets.Basic.someproperty
won't work, because "someproperty" is not in ChildClass's "Basic" propertysheet.
If your parent class and child class do not share propertysheets with the same name, you *can* access parent properties:
ChildClass.Propertysheets.ChildSheet.anotherproperty ChildClass.Propertysheets.Basic.someproperty
will both work.
If I'm correct, this is all wrong and a bad thing, surely?
However that was the worst-explained thing I've ever been responsible for and it's probably wrong. That particular configuration of punctuation in the subject header just struck a chord with me...
seb.
-----Original Message----- From: zope-dev-admin@zope.org [mailto:zope-dev-admin@zope.org]On Behalf Of Alexander Schonfeld Sent: 18 October 2000 10:25 To: zope-dev@zope.org Subject: Re: [Zope-dev] Inheritable Propertysheets!???!!?!?!?!!
I guess I can just use dtml methods that return lists and stuff, but is that as cool?
On Wed, 18 Oct 2000 18:21:33 +0900 Alexander Schonfeld <alex@garage.co.jp> wrote:
I'm doing an experiment... If I add more '!' and '?' marks will I get a response. Soon with enough experimentation I can find the optimal number and frequency of variation.
I want to inherit the properties of one zclass in another zclass, but it seems to cause some namespace clashing... shouldn't this be possible? Working with the instance of the class is fine, but inter-zclass inheritance (acquisition?) would be nice...
Cool feature?
Am I missing something? Thanks,
Alex.
1010011010101001101010100110101010011010 0 Digital Garage デジタル車庫 :) 1 Alexander Schonfeld 0 alex@garage.co.jp - pear - 03-5454-7219 1 http://www.zope.ne.jp/ http://www.garage.co.jp
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
1010011010101001101010100110101010011010 0 Digital Garage デジタル車庫 :) 1 Alexander Schonfeld 0 alex@garage.co.jp - pear - 03-5454-7219 1 http://www.zope.ne.jp/ http://www.garage.co.jp
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
1010011010101001101010100110101010011010 0 Digital Garage デジタル車庫 :) 1 Alexander Schonfeld 0 alex@garage.co.jp - pear - 03-5454-7219 1 http://www.zope.ne.jp/ http://www.garage.co.jp
participants (2)
-
Alexander Schonfeld -
Seb Bacon