control references

Trevor DeVore trevor at mangomultimedia.com
Sat Jun 22 10:39:01 CDT 2002


I have tried passing the long id of a field object as well as the the abbr id of
a field object to a command but when referencing it in the command the text of
the field object seems to be referenced rather than the object itself.  What
does work however is passing the id of the field object to the command and then
using "control ID objectID" to reference the object.

-----
-- Example of what doesn't work for me
-----
on mouseUP
  send ("changeObjectSide" && (the long ID of me))
end mouseUp

on changeObjectSide pObject
  put the rect of pObject into theRect
  put theRect -- This causes an error.  The text of the field object is seems to          
              -- be referenced rather than the object itself
end changeObjectSide

-----
-- Exampe of what does work for me
-----
on mouseUP
  send ("changeObjectSide" && (the ID of me))
end mouseUp

on changeObjectSide pObject
  put the rect of control ID pObject into theRect
  put theRect -- This displays the rect of the object
end changeObjectSide

Trevor DeVore
Blue Mango Multimedia
trevor at mangomultimedia.com

>Try :
>
>put the long id of fld 2 into theField
>put whatever into theField
>send whatever to theField
>
>>What I would like to say is  'put object field 2 into 
>>theField'  so that I can later say  'put "whatever" 
>>into theField'  and it would change the text of the 
>>object field 2.  
>_______________________________________________
>use-revolution mailing list
>use-revolution at lists.runrev.com
>http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list