Page 1 of 1

Groups forget who they are

Posted: Fri Feb 19, 2021 4:58 pm
by JereMiami
Probably long overdue for asking this, but sometimes LC tends to forget the name of a group or misidentifies it, particulalry when numbers are used. For instance, LC think grp "3" is grp "2"

It's probably some form of memory issue. So if I close and clear from memory, does this resolve this?

Re: Groups forget who they are

Posted: Fri Feb 19, 2021 5:11 pm
by Klaus
No memory issue or something, this is the way LC works!

Therefore:
NEVER EVER name your objects with a number!
Since everything is a STRING for LC
-> button "3"
is correctly treated as
-> button 3

Re: Groups forget who they are

Posted: Fri Feb 19, 2021 6:10 pm
by stam
yep that ^^

button "3" is interpreted as button number 3. That caught me out recently when i was using stacked graphics numbered 1-16; i just prefixed some text to the number and it sorted it.

Re: Groups forget who they are

Posted: Fri Feb 19, 2021 6:47 pm
by dunbarx
What everyone said.

There are good reasons to have numbers in the name of your controls, though, for reference, for ordering, whatever. But in those cases, for buttons, say:

myButton1
myButton2
myButtion3, etc.

Or even:

1myButton
2myButton
3myButton, etc.

One or two extra lines of code will access the order of these things handily.

Craig

Re: Groups forget who they are

Posted: Fri Feb 19, 2021 7:02 pm
by richmond62
NEVER EVER name your objects with a number!
Klaus,who knows, says it the "way things are".

Re: Groups forget who they are

Posted: Fri Feb 19, 2021 10:02 pm
by JereMiami
Thanks- that actually fixed it. I take it the order you add objects, such as groups, is group 1, group 2, etc ... even if you call them group "3", group "4", etc.

I tend to number groups within a list of groups. But, knowing what you just told me, that helps a lot in avoiding or resolving that problem.

Thanks Klaus (and the gang)!