<znewb101> How to assign and pass a variable as object ? </znewb101>
Hello I have an object I want to pass variables to, for example: <dtml-call "bsdtest002.set('nom','test of bsd object')"> <dtml-var "bsdtest002.get('nom')"><br> <dtml-call "bsdtest002.set('purpose','Allow persistent access to a bsddb dictionary object just like a COM object')"> <dtml-var "bsdtest002.get('purpose')"><br> etc.. works ok :-) Now I want to abstract the code to allow fast duplication <dtml-let bsdobj = bsdtest002> or any other name <dtml-call "bsdobj .set('nom','test of bsd object')"> <dtml-var "bsdobj .get('nom')"><br> <dtml-call "bsdobj .set('purpose','Allow persistent access to a bsddb dictionary object just like a COM object')"> <dtml-var "bsdobj .get('purpose')"><br> </dtml-let> This does not work. Please can someone help me understand how to pass object names as variables.. thanks again - Jason ________________________________________________________________ Jason CUNLIFFE = NOMADICS.(Interactive Art and Technology).Design Director
Jason Cunliffe wrote:
<dtml-let bsdobj = bsdtest002> or any other name <dtml-call "bsdobj .set('nom','test of bsd object')"> <dtml-var "bsdobj .get('nom')"><br> <dtml-call "bsdobj .set('purpose','Allow persistent access to a bsddb dictionary object just like a COM object')"> <dtml-var "bsdobj .get('purpose')"><br> </dtml-let>
There's an abundance of whitespace in them dtml-var's and dtml-call's; is that intentional (ie, cut and paste) or accidental?
This does not work.
_How_ does it not work? Does it come up with a Zope Error? If it does, What Is The Traceback? (if I could underscore that without resorting to HTML, I would). Regards, Daryl Tester
Daryl Tester wrote:
Jason Cunliffe wrote:
This does not work.
_How_ does it not work? Does it come up with a Zope Error? If it does, What Is The Traceback? (if I could underscore that without resorting to HTML, I would).
Try: _What_Is_The_Traceback?_ HTH ;-) Michael Bernstein.
participants (3)
-
Daryl Tester -
Jason Cunliffe -
Michael Bernstein