Duplicate Control IDs

Bob Sneidar bobs at twft.com
Mon Oct 24 16:53:52 EDT 2011


Hi Pete. 

I replicated your conditions exactly, even to the point of naming my stacks and groups the same. I then copy/pasted your code into the message box, and after fixing it (some typos there) I executed it. I still cannot reproduce the issue. All works as expected. This is in release 5.0. I suspect a plugin or something? Try moving all your plugins to another location and relaunching Livecode. 

Bob


On Oct 24, 2011, at 11:52 AM, Pete wrote:

> Bob,
> I'm doing this by script and copying the whole group, not individual
> controls.
> 
> Here's a more precise definition.
> 
> Stack1 has a group "SourceGroup" containing two field controls
> "SourceField1" and "SourceField2".
> 
> Stack2 has a group "DestGroup" with a couple of miscellaneous controls in
> it.
> 
> I need to copy SourceGroup from Stack1 into DestGroup in Stack2, which I do
> with:
> 
> copy group "SourceGroup of stack "Stack 1" to group "DestGroup" of stack
> "Stack2"
> 
> After that I see SourceGroup as a member of DestGroup in Stack 2 but
> controls SourceField1 and SourceField2 of group SourceGroup of group
> DestGroup of Stack2 both have an ID of zero.
> 
> I have not tried setting up a test stack to see if this always happens, but
> it happens consistently in my application's stack.
> 
> Pete
> Molly's Revenge <http://www.mollysrevenge.com>
> 
> 
> 
> 
> On Mon, Oct 24, 2011 at 11:28 AM, Bob Sneidar <bobs at twft.com> wrote:
> 
>> Hi Pete. I tried to duplicate this and cannot. I created 2 stacks. In stack
>> one I had field1 and field2. In stack 2 I had field3 and field4. I grouped
>> the fields in the second stack, copied the 2 fields in the first stack,
>> selected the grouped fields in the second stack, clicked Edit Group, and
>> then pasted the two fields. The result is, the pasted fields were properly
>> assigned unique ID's different than the first two fields, which is what you
>> would expect.
>> 
>> Bob
>> 
>> 
>> On Oct 24, 2011, at 11:19 AM, Pete wrote:
>> 
>>> It definitely took me by surprise!  I plan to submit to QCC but thought I
>>> would check if anyone else had come across this at all.
>>> Pete
>>> Molly's Revenge <http://www.mollysrevenge.com>
>>> 
>>> 
>>> 
>>> 
>>> On Mon, Oct 24, 2011 at 11:09 AM, Peter M. Brigham, MD <pmbrig at gmail.com
>>> wrote:
>>> 
>>>> On Oct 24, 2011, at 1:45 PM, Pete wrote:
>>>> 
>>>>> I have run into a weird situation that ends up with duplicate control
>> IDs
>>>> on
>>>>> a card which I thought couldn't happen.
>>>>> 
>>>>> The scenario is that I copy a group containing two field controls from
>>>> one
>>>>> stack to a group in another stack.  After copying, the two field
>> controls
>>>>> both have an ID of zero!  Needless to say, this plays havoc with
>> anything
>>>> I
>>>>> do that tries to access the fields.
>>>>> 
>>>>> I have worked around the problem by creating a new group, then copying
>>>> the
>>>>> two fields individually from the source group to the new one and that
>>>> works
>>>>> fine.
>>>>> 
>>>>> Anyone ever come across this before?
>>>> 
>>>> I've never seen this. Sounds like a bug, and a serious one at that.
>> Control
>>>> IDs should be completely robust and behave as advertised in all cases.
>>>> Whatever you are doing seems to have exposed a crack in how the IDE (or
>> is
>>>> it the engine?) assigns IDs. You should report this to the QCC and flag
>> it
>>>> as urgent, in my opinion. I'd hate to have to start wondering about the
>>>> stability of object IDs.
>>>> 
>>>> -- Peter
>>>> 
>>>> Peter M. Brigham
>>>> pmbrig at gmail.com
>>>> http://home.comcast.net/~pmbrig
>>>> 
>>>> 
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>> 
>>>> 
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list