altID

Eric Chatonet eric.chatonet at sosmartsoftware.com
Sun May 20 09:03:17 EDT 2007


Hi David,

AltID works perfectly as long as there is not yet another object with  
this ID:
Then always choose very high altIDs to avoid conflicts:

Set the altID of btn ID 1011 to 600000
put the long ID of btn ID 600000
 > button id 1011 of card id 1002 of stack <stack path>
:-)

Le 20 mai 07 à 14:35, David Bovill a écrit :

> 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?

Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
http://www.sosmartsoftware.com/
eric.chatonet at sosmartsoftware.com/
----------------------------------------------------------------





More information about the use-livecode mailing list