Getting the type of a control

Ben Rubinstein benr_mc at cogapp.com
Mon Nov 4 07:22:01 EST 2002


Is there a clean way to get the type of a control?

If I write a script that goes through the controls of a stack in order, I
can get the properties of each control, and list them.  The only property I
don't seem to be able to get is what type of control it is - field, button,
etc.  You can even get the number property, which is dependant on the type -
eg if you have a group containing a field, a button, and another field, you
get
    layer number
    1       1  - first group
    2       1  - first field
    3       1  - first button
    4       2  - second field

...but I can't see anything to return the type.  The workaround I've found
is to get first word of the long name - but that seems like a hack.  Is
there a clean way?

TIA,

  Ben Rubinstein               |  Email: benr_mc at cogapp.com
  Cognitive Applications Ltd   |  Phone: +44 (0)1273-821600
  http://www.cogapp.com        |  Fax  : +44 (0)1273-728866





More information about the use-livecode mailing list