Grouped Controls(Objects)

Mats Wilstrand mats.wilstrand at tapirsoft.com
Sat Mar 8 08:08:36 EST 2014


Hi Terry!

>From 6.1 there are four new properties you can use for tasks like yours:

"controlIDs" reports the short IDs of all the controls of a card or group.
(undocumented)
"controlNames" reports the short names of all the controls of a card or
group. (undocumented)
"childControlIDs" reports the short IDs of all the direct children of a card
or group.
"childControlNames" reports the short names of all the direct children of a
card or group.

Requires a minimum of code to do what you want and does it fast:

on mouseUp
   repeat for each line tID in the controlIDs of grp "myGroup"
      delete control id tID
   end repeat
end mouseUp

We must thank the guys in the deep and dark mines of the C++ mountain for
contributing things like this!

Best regards
Mats

> -----Original Message-----
> From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On
> Behalf Of Terence Heaford
> Sent: den 8 mars 2014 13:15
> To: How to use LiveCode
> Subject: Grouped Controls(Objects)
> 
> I have a group to which I add objects.
> 
> create field in group  "myGroup"
> 
> put the id of the last fld into tID
> 
> I then have a property of the group where I store the id called
uObjectList
> 
> Then at some point I delete all the objects in uObjectList to clear out
the
> group.
> 
> Is there a simpler way to do this?
> 
> Is it possible to get a list of objects contained in a group?
> 
> 
> Thanks
> 
> Terry
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list