Re: [Zope-dev] 0.4.0 prerelease snapshot (was zpatterns-0.4 ?)

2000-06-11 Thread Itamar Shtull-Trauring

"Phillip J. Eby" wrote:
 
 By popular demand, I am releasing a development snapshot of version 0.4.0.
 Please see the main ZPatterns download page.

Thank you!  Also, people might want to know that it includes a nice mixin
class that lets you respond to transaction events (rollback, commit).

-- 
Itamar S.T.  [EMAIL PROTECTED]   
"It don't get thingier than that!"

___
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] 0.4.0 prerelease snapshot (was zpatterns-0.4 ?)

2000-06-11 Thread Phillip J. Eby

At 04:22 PM 6/11/00 -0400, Kevin Dangoor wrote:

What will be the right way to subclass ObjectManager? CatalogAware won't
really be necessary, because you can use the events stuff to catalog
things... but, I make a lot of things ObjectManagers...

All that's required is that manage_afterAdd call self._objectAdding() and
manage_beforeDelete call self._objectDeleting().  See DataSkins.py for an
example in the DataSkin base class.

As for what the right way to get this to happen in ZClasses (apart from
creating a Python base), I haven't the foggiest.  So, in the code I'm
working on now, I've revised DataSkin's implementation of these methods to
call ObjectManager's implementation, as long as the skin's aq_base has an
objectValues method.  This ought to work safely with any kind of object.
I'll have to try it out though, to be sure.  Perhaps you'll see it in
snapshot 2 (if there is one before the final release).

In any case, my goal is that all you ever need to do to make a DataSkin
ZClass should be to put DataSkin first in the base class list.  About the
only real limitation would be that you mustn't overwrite the default
__init__ method with something that isn't specifically written for
DataSkins support.


___
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] 0.4.0 prerelease snapshot (was zpatterns-0.4 ?)

2000-06-10 Thread Phillip J. Eby

By popular demand, I am releasing a development snapshot of version 0.4.0.
Please see the main ZPatterns download page.

This is EXTREMELY ALPHA and includes a fair amount of code that just got
written or debugged today.  Actually, most of the stuff I wrote today got
exercised pretty well.  I'm more concerned about whether I broke anything
that worked before in the process, as I haven't come up a way to regression
test this thing except manually.  :(

Anyway...  there are quite a few undone bits as yet, but the main things
are there.  DataSkins, and Folders w/Customizer support, for example.  Ty's
ExprGetter AttributeProvider, which is pretty cool, and my updates to it to
make it even cooler.  :)

Some things that may not work right...  DataSkins need to have their
_objectAdding()/_objectDeleting() methods called from
manage_afterAdd/manage_beforeDelete, and if you subclass ObjectManager or
CatalogAware or anything else with custom hooks for these methods, you may
break add/delete events, which are required for some things to work.  This
might not affect you in the prerelease, because not much is wired to the
events yet.  But they may break in the final release.

In general, you should assume that this release is dangerous.  On various
occasions today, it has caused Zope to dump core.  In each case, I found
and fixed the problems, which had to do with the new deep
acquisitional/transactional/computedattribute magic for DataSkins.  There
is no guarantee, however, that I have fixed all such bugs.

I reserve the right to make incompatible changes between this release and
the final 0.4.0, that would require you to delete all prerelease-based
objects and start over.  (I am doing my best to maintain transparent
upgradability from 0.3.0, however.  But I won't be putting in data upgrade
code for interim releases.)

Last, but not least, the docs are even worse than usual for my releases,
and some of the newer objects have ugly, missing, or confusing interim
icons.  So all in all, use at your own risk.


At 04:06 PM 6/7/00 +0300, Itamar Shtull-Trauring wrote:
"Phillip J. Eby" wrote:

 I'm shooting for release by the end of next week.  Search plugins have not
 been finished yet, but in any case they will NOT work with prior versions;
 there is no place to plug them in, nor will any of the old code call
them. :)

Could you maybe release a preliminary version in the beginnng of the week,
even if it's not finished?  I'd like to start designing a Product using the
events-sending interfaces, and it'd be a real help if I could know even
approximately what the interfaces looked like.  Not that I'm rushing you or
anything :)

Have a look at Agents.py in the new release.  To have an object that
receives events, subclass the Agent class, and override:

def _getMementoFor(self,client):

def _objectChanged(self,client,memento):

def _objectDeleted(self,client,memento):

def _objectAdded(self,client):

as appropriate.  getMemento should return a snapshot of any data you want
passed into the methods that take a "memento" parameter.  Make sure your
memento contains only "immutables all the way down", since the object
you're watching ("client")might change anything that's mutable.

By the way, the final release of 0.4.0 should (time permitting) include an
"ExprNotifier" which can automatically translate the above events into
calls to arbitrary DTML expressions, including handling memento generation
for you by saving specified expressions executed against the object before
it changes.


___
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 )