[Zope] Re: Late binding

Tres Seaver tseaver at palladion.com
Wed May 2 23:14:18 EDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Garito wrote:
> Hi all!
> In this function:
> 
> def ProcesarTALES(self, expresion, args = None):
>         if expresion is None: return None
>         engine = getEngine()
>         contextoTALES = {'container': self.aq_parent, 'here': self,
> 'context': self, 'request': self.REQUEST, 'options': {}, 'sitio': self.Sitio(),
> 'user': getSecurityManager().getUser(), 'entidad': self.Entidad()}
>         if args is not None: contextoTALES['options'] = {'args': args}
>         resultado = engine.getContext(contextoTALES).evaluate(engine.compile
> (expresion))
>         return resultado
> 
> is possible that the execution of entidad (self.Entidad()) has launched at
> evaluation time not at assign time?

Your code calls 'self.Entidad()' when preparing the context dictionary,
which is before the evaluation of tne TALES expression.


Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGOVOK+gerLs4ltQ4RAg35AJ9ztTO6kAtXNlzT2aRl8kCthY421ACcD+Hc
51/2UNbRJ8S/IP3eg0sfZB0=
=LDVJ
-----END PGP SIGNATURE-----



More information about the Zope mailing list