controlIDs|Names of group

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, LCMark

wilstrand
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 114
Joined: Mon Jan 03, 2011 3:02 pm
Contact:

Re: controlIDs|Names of group

Post by wilstrand » Wed Nov 06, 2013 1:44 am

I would love that Monte!

Best regards,

Mats
http:www.tapirsoft.on-rev.com
Open Source LiveCode Plugins - rIDE, rGrid, rTree
LiveCode projects

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: controlIDs|Names of group

Post by malte » Wed Nov 06, 2013 11:34 am

I would love that too!

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 996
Joined: Thu Apr 11, 2013 11:27 am

Re: controlIDs|Names of group

Post by LCMark » Wed Nov 06, 2013 11:38 am

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?

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1561
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: controlIDs|Names of group

Post by monte » Wed Nov 06, 2013 11:53 am

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
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1561
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: controlIDs|Names of group

Post by monte » Wed Nov 06, 2013 11:59 am

Oh... then we would need to be able to:

Code: Select all

set the <prop> of child group 1 of me
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: controlIDs|Names of group

Post by malte » Wed Nov 06, 2013 12:42 pm

@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

wilstrand
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 114
Joined: Mon Jan 03, 2011 3:02 pm
Contact:

Re: controlIDs|Names of group

Post by wilstrand » Wed Nov 06, 2013 1:13 pm

@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
http:www.tapirsoft.on-rev.com
Open Source LiveCode Plugins - rIDE, rGrid, rTree
LiveCode projects

Post Reply

Return to “Engine Contributors”