Strange contents of long name

Kay C Lan lan.kc.macmail at gmail.com
Wed Jan 16 03:21:52 EST 2013


On Wed, Jan 16, 2013 at 4:44 AM, Peter Haworth <pete at lcsql.com> wrote:
> Here's a recipe.

Pete,

again thanks for pointing this out. Now that I've had time to think
about this, I'm starting to appreciate why LC creates all those unique
IDs.

If you take your recipe and:

Add a further fld called "Field" to the original group "group"

then Add three more fields, the first called "Field" the second with
it's name removed so LC adds it's ID as part of it's name, and the
third fld call "Field". Group these as a new group called "group"

If you now check the long names, you have 4 fields that have identical
long names! You can name all your cards the same, only your substacks
must have unique names; so that really paves the way for innumerable
possibilities of identical long names. Not good, especially if you
were planning on doing something to the object's parent group or card.

I think I'll be creating an array: aStackName[ID] short name,long name

or even: aStackName[ID][short name]
...[long name]
...[main stack name]
...[card name]
...[group name]
...[the stuff I actually want to track]

to help sort through this mess.

Interestingly if you:

put "z" into fld "Field" of group "group" of card "card"

no warning it just goes into the first field you named "Field" in the
first group you named "group" of the first card you named "card".

I wouldn't be surprised if someone on this List hasn't used such a
quirk to some mind blowing advantage.

You have undoubtedly saved me from a heap of reworking when months
down the track I would have eventually stumbled upon this.




More information about the Use-livecode mailing list