On 28/11/00 2:53 pm, Peter Reid <[EMAIL PROTECTED]> wrote:
> Does anyone know how to refer to object generically in MC? For
> example, I'd like to be able to write scripts that look at the
> handlers/scripts for all objects on a card, e.g.
>
> repeat for all objects x in this card
> switch objectType of x
> case "field"
> break
> case "button"
> etc.
repeat with i = 1 to the number of controls
switch (word 1 of the name of control i)
case "field"
> This also raises another area of my ignorance, how do you pass full
> object references rather than simple names, e.g.
>
> formatMyField field "Address"
>
> I find myself often resorting to "short name of" and specific
> handlers or script fragments dedicated to specific object types, when
> a generic approach would be cleaner and easier!
You can construct the send with quotes:
formatMyField "field" && quote & "Address" & quote
Or:
put the long id of field "address" into tLongID
formatMyField tLongID
Regards,
Kevin
Kevin Miller <[EMAIL PROTECTED]> <http://www.runrev.com/>
Runtime Revolution Limited (formerly Cross Worlds Computing).
Tel: +44 (0)131 672 2909. Fax: +44 (0)1639 830 707.
Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.