functions: use a controls name as a parameter

Malte Brill malte.brill at t-online.de
Sat Jul 24 11:03:30 EDT 2004


Hi list,

maybe you can help me with the following:

I want a function with 2 parameters. Each one the name of a control.

Like this

function test theObject1,theObject2
  return the width of theObject1,the height of theObject2
end test

This will work if the names of the controls are quoted:

test("grc myGrc","img myImg")

what I want is a syntax like

test(grc "myGrc",img "myImg")

just like intersect does e.g intersect(grc "myGrc",img "myImg") as quoting
the whole name doesn´t seem natural to me and I think it wouldn´t be good
style.

Any hints?


Malte



More information about the use-livecode mailing list