altID

David Bovill david at openpartnership.net
Sun May 20 08:35:31 EDT 2007


Has anyone got extensive experience of using altID? I am thinking of using
it - but not sure exactly how.

The scenario I have is to do with a library of components that get copied
all over the place, replace each other and need a good way of referring to
each other and their library equivalents. I cant to use ids as they change
when copied. I can't use names, because there may be other controls of the
same name, and i want to be able to rename them without affecting anything,
so... can I use altIDs?

For a while now I have been using custom properties like:

getprop title_Field
  return the long id of fld "Title" of me
end title_Field

Which works very well - put the title_Field of group "Outline" works.
Renaming can be handled using a look-up in the custom property and trapping
for the nameChanged message. The script is nicely organised as there is only
one place where a control is referred to.

That said could I be using altIDs or another technique?



More information about the use-livecode mailing list