Re: [Zope-dev] Inheritable Propertysheets!???!!?!?!?!!

2000-10-19 Thread Alexander Schonfeld
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" <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> > Behalf Of Alexander Schonfeld
> > Sent: 18 October 2000 10:25
> > To: [EMAIL PROTECTED]
> > 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 <[EMAIL PROTECTED]> 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$B!!%G%8%?%k > > 1  Alexander Schonfeld
> > > 0  [EMAIL PROTECTED] - pear - 03-5454-7219
> > > 1  http://www.zope.ne.jp/ http://www.garage.co.jp
> > >
> > >
> > >
> > > ___
> > > Zope-Dev maillist  -  [EMAIL PROTECTED]
> > > 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$B!!%G%8%?%k > 1  Alexander Schonfeld
> > 0  [EMAIL PROTECTED] - pear - 03-5454-7219
> > 1  http://www.zope.ne.jp/ http://www.garage.co.jp
> >
> >
> >
> > ___
> > Zope-Dev maillist  -  [EMAIL PROTECTED]
> > 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  -  [EMAIL PROTECTED]
> 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$B!!%G%8%?%khttp://www.zope.ne.jp/ http://www.garage.co.jp



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )


RE: [Zope-dev] Inheritable Propertysheets!???!!?!?!?!!

2000-10-18 Thread Seb Bacon
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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Alexander Schonfeld
> Sent: 18 October 2000 10:25
> To: [EMAIL PROTECTED]
> 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 <[EMAIL PROTECTED]> 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$B!!%G%8%?%k > 1  Alexander Schonfeld
> > 0  [EMAIL PROTECTED] - pear - 03-5454-7219
> > 1  http://www.zope.ne.jp/ http://www.garage.co.jp
> >
> >
> >
> > ___
> > Zope-Dev maillist  -  [EMAIL PROTECTED]
> > 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$B!!%G%8%?%k 1  Alexander Schonfeld
> 0  [EMAIL PROTECTED] - pear - 03-5454-7219
> 1  http://www.zope.ne.jp/ http://www.garage.co.jp
>
>
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> 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  -  [EMAIL PROTECTED]
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 )


Re: [Zope-dev] Inheritable Propertysheets!???!!?!?!?!!

2000-10-18 Thread Alexander Schonfeld
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 <[EMAIL PROTECTED]> 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$B!!%G%8%?%k 1  Alexander Schonfeld
> 0  [EMAIL PROTECTED] - pear - 03-5454-7219
> 1  http://www.zope.ne.jp/ http://www.garage.co.jp
> 
> 
> 
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> 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$B!!%G%8%?%khttp://www.zope.ne.jp/ http://www.garage.co.jp



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Inheritable Propertysheets!???!!?!?!?!!

2000-10-18 Thread Alexander Schonfeld
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$B!!%G%8%?%khttp://www.zope.ne.jp/ http://www.garage.co.jp



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )