setting a behavior with out using an ID

Monte Goulding monte at sweattechnologies.com
Thu Oct 23 21:09:23 EDT 2014


On 24 Oct 2014, at 11:58 am, Richard Gaskin <ambassador at fourthworld.com> wrote:

> Thanks for the info, Monte:
> > Behaviors are saved as an id and a stack name and no matter how
> > you set them that's what the internal reference is. lcVCS handles
> > behaviors fine (and image ids etc) as long as the stackFile
> > import/export order is right. It also has a plugin system to
> > support libraries and custom controls that save object references
> > like DataGrid templates etc. What lcVCS can't ensure is that if you
> > hard code an id into a script everything will work because when
> > changes are merged ids can change if there are two new objects on
> > different branches with the same id.
> 
> If I understand this correctly, all of the following conditions need to be true to prevent someone from using lcVCS for work involving behaviors:
> 
> - Multiple developers are working on the same stack
> - They're both adding behavior buttons
> - Their new behavior buttons have the same ID
> - Any manual step like a simple copy-and-paste of one of the new
>  behavior buttons into the main branch is considered undesirable.
> 
> That doesn't sound so bad.  Worse-case it takes less than a minute of manual labor to resolve technically, much less time than would hopefully be spent in code review to determine if the merge is desirable.


Actually that scenario is not an issue at all for lcVCS. The only problem would be if you had a script that referred to the behavior button by id for some reason. lcVCS assigns each object a UUID during export and translates any object refererences to UUIDs so that at the end of the import it can handle the duplicate ID issue by translating back from UUID to id where in some cases the id is different to what was exported. lcVCS doesn't edit your scripts though hence the problem there. This is why I have a plugin system so that other developers can write the little bit of code that finds object references used by their libraries etc and do the translation steps.

Cheers

Monte

--
M E R Goulding 
Software development services
Bespoke application development for vertical markets

mergExt - There's an external for that!




More information about the use-livecode mailing list