[Zope] Anybody familiar with the <built-in> tag?

e-Musty emusty@mailbox.hu
Mon, 4 Feb 2002 18:48:13 +0100


Thank you Seb.

So you mean, the <built-in function id> literal in my DTML is kinda
substitution of another code that calls the id() /or as you suggested,
getId()/ method, donnu?

And as it is a DTML method for, I suppose that if I "embed it to" (call it
from) various DTML documents, it will replace <built-in function id> with
the name of the caller DTML document. Could it be possible? If it is so,
it's a great feature in Zope.



-----Original Message-----
From: seb bacon [mailto:seb@jamkit.com]
Sent: 2002. február 4. 18:34
To: emusty@mailbox.hu
Cc: Zope Zope Listserver
Subject: Re: [Zope] Anybody familiar with the <built-in> tag?


It's not a tag, but a default representation of a python method.

To see what I mean, try typing 'str' at the python interpreter.

In this case, id is a method.  In some Zope objects, id is a method
(viz. id()) and in others a property.  To get round this, all objects
should uniformly provide a getId() method.  so try getId instead of id
in your code.

seb


On Mon, 2002-02-04 at 17:18, e-Musty wrote:
> After creating a ZSearch interface for two ZSQL methods, I've realized
that
> the input form created by ZSearch contains something like follows:
>
> [we are within a form...]
>     <tr><th><built-in function id>/first name</th>
>         <td><input name="<built-in function id>/first_name"
>                    width=30 value=""></td></tr>
>     <tr><th><built-in function id>/last name</th>
>         <td><input name="<built-in function id>/last_name"
>                    width=30 value=""></td></tr>
>
> I am very curious what effect the <built in function id> tag has. I guess,
> it is substituted by the id of the ZSQL method the form is currently
> querying (keep in mind that the ZSearch made this one form for two ZSQL
> methods). However I am not sure that my tips are good, if anyone has ever
> worked with <built-in> tag, please tell me/us how to handle it.
>
> Thx in advance,
> e-M
>
>
>