constructors and destructors
Hello, I'm a zope newbie so please excuse me if this is obvious: If I make a ZClass, then an instance of it can be made by using the 'add' pull down menu of the management interface. This in turn calls an 'add_myobject' method in which I may do anything, including creating an entry in a database. OK. Now if I wish to use the zope management interface to delete my object ie: one of the 'cut' or 'delete' buttons, how do I call a 'destructor' method to get rid of my database entry associated with that object? Or am I missing the point completely and should be doing this another way?? Thanks for any responses. Roman. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Roman Bogoyev, Computer Systems Manager, email: roman@maths.uwa.edu.au UWA Maths, 35 Stirling Hwy, Crawley, phone: +61 8 9380 3379 Western Australia 6009 fax: +61 8 9380 1028
On Wed, Dec 05, 2001 at 04:06:37PM +0800, Roman Bogoyev wrote:
OK. Now if I wish to use the zope management interface to delete my object ie: one of the 'cut' or 'delete' buttons, how do I call a 'destructor' method to get rid of my database entry associated with that object?
Define "manage_beforeDelete" method. Zope will call it. (Russian? Can read/write russian cyrillic?) Oleg. -- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
participants (2)
-
Oleg Broytmann -
Roman Bogoyev