[Zope3-dev] Problems with context (or 'Why it never works for me?')
Sidnei da Silva
sidnei@redesul.com.br
Fri, 4 Jul 2003 16:46:30 -0300
Howdy folks,
Im trying to make a folder-like content class that uses the
SQLConnections service to build a listing of contents. Everything
works fine, except for one thing: The SQLConnection service is
local-only (eg: theres no global version of it). I tried to follow
various tips on how to make my method a ContextMethod, but all
failed. If I move this stuff into an Adapter, it works fine, but I end
up having to implement lots of other adapters to get it playing nicely
(eg: displaying the number of items contained on the folder, etc.).
The problem so far seems to be that ZopeContainerDecorator does a
getProxiedObject(self) and calls the method (items in this case) on
the unwrapped object, which causes it not to have a context.
What is the Known and Recommended Way (tm) of getting around this?
PS: I tried the example on zope.app.services.pagefolder as Jim
recommended, but no clue.
[]'s
--
Sidnei da Silva (dreamcatcher) <sidnei@x3ng.com.br>
X3ng Web Technology <http://www.x3ng.com.br>
GNU/Linux user 257852
Debian GNU/Linux 3.0 (Sid) 2.4.20-powerpc ppc
If it's worth hacking on well, it's worth hacking on for money.
-----------------------------------------------------------------------
Verified for virus by mail.redesul.com.br
Scanner: clamscan / ClamAV - Version 0.54 - Updated 01/07/2003