[Zope] Z Classes Tutorial: Rough Draft

Ty Sarna tsarna@endicor.com
7 May 1999 22:34:23 GMT


In article <613145F79272D211914B0020AFF6401915C3FA@gandalf.digicool.com>,
Michel Pelletier  <michel@digicool.com> wrote:
> A better solution is to create a Python class (in a Product) and
> sprinkle a little ZClass magic pixie dust in the __init__.py file to
> make the Python class (PClass) subclassable by a ZClass.  Thus when you

Is there and example of this you can point us at? ("Hey, Mr. Zope
Pusher, I need some magic pixie dust" :->)

> Yeah!  The Catalog uses this method heavily.  In fact, the only methods
> actually defined in the ZClass are the managment and searching
> interfaces.  All the guts are written in Python.

This is interesting.  ZClasses didn't look quite powerful enough for
some of the things I'd like to do with them.  But a ZClass that
subclassed from a read-write TinyTable would be perfect for many of
those things. 

> > The interface is a little clunky in places ie. how do you 
> > make a view be
> > the second in the list instead of the first? Also, how do you 
> > control the
> > order that the item appears in the Add object dropdown?
> > 
> 
> Basic stack theory tells us that through various manipulations of the
> 'First' operation, you can arrange the views any way you want.  Play
> with it a bit and you'll get it how you want it.

In my every-so-slowly-developing Palm Desktop in Zope, I have a screen
that controls the order of conduits.  Instead of a "first" button, I
have "Earleir" (swap with one above) and "Later" (swap with one below)
buttons, which seems friendlier.  Maybe a First/Earlier/Later/Last (or
First/Up/Down/Last) is what's called for.