Page 5 of 5
Re: controlIDs|Names of group
Posted: Wed Nov 06, 2013 1:44 am
by wilstrand
I would love that Monte!
Best regards,
Mats
Re: controlIDs|Names of group
Posted: Wed Nov 06, 2013 11:34 am
by malte
I would love that too!
Re: controlIDs|Names of group
Posted: Wed Nov 06, 2013 11:38 am
by LCMark
Would anyone else like child<any object type>IDs & <any object type>IDs ? I think it would be quite helpful...
Just to play devil's advocate here... What is the use-case for specific properties of this type? It seems reasonable when we only have a handful of object types, but what happens when we have 20, 50, 100?
Re: controlIDs|Names of group
Posted: Wed Nov 06, 2013 11:53 am
by monte
OK, just the other day I had some code:
Code: Select all
repeat with tControl=1 to the number of groups of me
-- do stuff
end repeat
Then I added a group to each group so it broke that code. So I changed it to each line of the childControlIDs... but then I had to filter out the objects that aren't groups. It might not be necessary if we could do this:
Code: Select all
repeat with tControl=1 to the number of child groups of me
-- do stuff
end repeat
Re: controlIDs|Names of group
Posted: Wed Nov 06, 2013 11:59 am
by monte
Oh... then we would need to be able to:
Code: Select all
set the <prop> of child group 1 of me
Re: controlIDs|Names of group
Posted: Wed Nov 06, 2013 12:42 pm
by malte
@runrevMark:
I tend to have stacks that have quite a number of controls on them. Quite often there are situations where I need to do stuff on a specific type of controls, eg buttons only, so if I could do something like
Code: Select all
put the buttonIDs of this cd into tButtons
repeat for each line theButton in tButtons
-- do stuff
end repeat
this would save a whole lot of iterations in comparison to
put the controlIDs of this cd into tControls
repeat for each line theControl in tControls
if word 1 of the name of control ID theControl <> "button" then next repeat
end repeat
Re: controlIDs|Names of group
Posted: Wed Nov 06, 2013 1:13 pm
by wilstrand
@runrevMark:
To add to the examples and arguments of Monte and Malte, my main argument for this is that it would
increase performance of certain types of applications significantly. In the development environment,
searching, filtering and keeping track of a certain type of object is a central feature of things like the
Project Browser or rIDE. And a lot of applications like simulations and games would have the same
advantages in performance from being able to "repeat for each child controlType". I also think this
could be used as and evolve further into something like the "_internal filter", but available to all of us.
Best regards,
Mats