Re: [Zope-dev] More comments on ZPatterns

2000-07-05 Thread Scott Parish

Thus spake Phillip J. Eby ([EMAIL PROTECTED]):

 and when I ask one of my TableInfo instances for their footnote it
 comes right out of MySQL! Cool. Now.. I can't seem to figure out how
 to *change* the data in the database when the user 'edits' the
 
 Here's some more top-secret documentation...  Use a GenericTrigger to
 implement attribute changes.  Set up your trigger to be activated on object
 changes, and set the trigger expression to call an SQL method, e.g.:
 

First off it is amazing what a rush it is to fight ZPatterns, and finualy start
winning. g

Anyway, Under Zope 2.2, the 'Upon' property of a trigger doesn't have a list 
of 'event_kinds'.  I think this is related to an earlier post where i 
complained about zope 2.2 not being able to get such values (for select 
types) from aquisition, or in this case from a seperate property in its 
class.  Has anybody thought of a way to address this problem, as it didn't
sound like the official zope distribution wants to act the way that would
allow the 'Upon' property to get its proper values right now. (no, i'm
not going to go off about that g)  

Also, should i not be trying to use ZPatterns 4aX under Zope 2.2?  I thought
i read that to use triggers a person should use Zope 2.2, but it doesn't
appear this has been tested under 2.2. (although it is alpha, i haven't 
forgotten that)

ZPatterns is starting to taste pretty sweet.  Keep up the good work!
sRp

-- 
Scott Parish
http://srparish.net/

 PGP signature


Re: [Zope-dev] ZPatterns: DropZone example

2000-07-04 Thread Scott Parish

Thus spake Phillip J. Eby ([EMAIL PROTECTED]):


 That's all quite true, but it would probably be simplest to do such a thing
 using AttributeProviders and SheetProviders in the white-box specialists.
 It does seem reasonable to have those providers talk to an
 AccountingProcessor object if you want to make your framework talk to
 different back-ends, but I think it is misleading and incorrect to call
 AccountingProcessor a specialist, as it's not an application-level service
 object, but a private implementation helper.
 

Does anybody out there have even the slightest clue about how to go about
using AttributeProviders and SheetProviders?  A select few terse hints on
this subject would really help us (me) figure it out enough to start working
on some howto's.

 Interestingly, you've just given me what may be a motivating example for
 using Shane Hathaway's DatabaseAPI in conjunction with ZPatterns, assuming
 of course that I've correctly understood his most recent explanation of the
 DatabaseAPI product.

Am i wrong in thinking that DatabaseAPI is a completely separate solution to
the same problem that ZPatters is suppose to address?  Personally i have to 
give DatabaseAPI props for being quite easy to understand and use, while
not sacrificing power.

sRp

-- 
Scott Parish
http://srparish.net/

 PGP signature


Re: [Zope] ZPatterns: Deleting objects from a Rack?

2000-06-28 Thread Scott Parish

Thus spake Chris Withers ([EMAIL PROTECTED]):

 Ty Sarna wrote:
  call the manage_delete() method on the object. That is, you ask the
  object to delete itself.
 
 This seems unnecessarily long-winded to me. What are the reasons for it
 being like this? (examples are good... ;-)
 
  However, once you have the object, operations on the object should be
  done as methods on the object.
 
 I'm sure it's against Demeter's Law (I've read the Wiki ;-) to work this
 way. You should ask the rack to delete an object and it can process this
 how it wants... most often this would be by asking the object to delete
 itself, but maybe it's be more efficient for the rack to just delete the
 object (for example, if the object is actually a row in an SQL table)
 

I could be mistaken about this, as I'm still having trouble following the
ZPatterns train of thought, but I think the reason that the object needs to
delete itself is that the object may not be stored in a single place.  For
instance, the object might be created from 5 rows from seperate tables in
an SQL db and 2 attributes gotten from LDAP.  I'm not entirely clear how
asking the object to delete itself in this case is going to improve the
situation over just asking the rack to, but I think that was the intent.

sRp

-- 
Scott Parish
http://srparish.net

 PGP signature


[Zope-dev] LoginManager add trouble

2000-06-20 Thread Scott Parish

Using:

Zope2 (cvs)
ZPatterns 0.3.0
LoginManger 0.8.6

When I try to add a LoginManager, I get the following error and traceback.
Any ideas?

sRp

-

Error Type: KeyError
Error Value: _owner

Traceback (innermost last):
  File /a4/srp/Zope2/lib/python/ZPublisher/Publish.py, line 222, in publish_module
  File /a4/srp/Zope2/lib/python/ZPublisher/Publish.py, line 187, in publish
  File /a4/srp/Zope2/lib/python/Zope/__init__.py, line 221, in 
zpublisher_exception_hook
  File /a4/srp/Zope2/lib/python/ZPublisher/Publish.py, line 171, in publish
  File /a4/srp/Zope2/lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: manage_addLoginManager)
  File /a4/srp/Zope2/lib/python/ZPublisher/Publish.py, line 112, in call_object
(Object: manage_addLoginManager)
  File /a4/srp/Zope2/lib/python/Products/LoginManager/LoginManager.py, line 230, in 
manage_addLoginManager
  File /a4/srp/Zope2/lib/python/OFS/ObjectManager.py, line 249, in _setObject
(Object: ElementWithAttributes)
  File /a4/srp/Zope2/lib/python/AccessControl/Owned.py, line 267, in 
manage_fixupOwnershipAfterAdd
(Object: SheetProviderContainer)
  File /a4/srp/Zope2/lib/python/AccessControl/Owned.py, line 174, in changeOwnership
(Object: SheetProviderContainer)
KeyError: (see above)

-- 
Scott Parish
http://srparish.net

 PGP signature