Re: [Zope-dev] Bindings and Votings

2000-10-26 Thread Chris Withers

Michel Pelletier wrote:
 
 Sorta.  There is a bindings tab on PythonMethods where you assign names
 to various variables that show up in your namespace.  'self' is the
 container.  'context' is the context.  So:
 
 self.objectValues()
 
 will allways call the container whereas:
 
 context.objectValues()
 
 will call the method on the currently bound object.

...but can you bind self to the context or, more perversely, context to
the container?

 Unfortunately, complex also means "too hard for me to think too hard
 about".  Any volunteers?

How about the person who suggested it? ;-)

cheers,

Chris

___
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] Bindings and Votings

2000-10-26 Thread Toby Dickenson

 ...but can you bind self to the context or, more perversely, 
 context to
 the container?

As the first line in your PythonMethod:

self,context = context,self

But why would you want to?

___
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] Bindings and Votings

2000-10-26 Thread Chris Withers

Toby Dickenson wrote:
 
 As the first line in your PythonMethod:
 
 self,context = context,self

Haha... I forgot what it's like to have real assignment in TTW methods
;-)

 But why would you want to?

No particular reason, just wondering :-)

Chris

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