new trick, for me

Peter Brigham MD pmbrig at gmail.com
Fri Mar 4 14:04:17 EST 2011


It appears not to trigger openCard.

FYI, the reason that I needed to do this is that I am trying to do  
something with long id's and found what seems to be a bug in how the  
engine handles this. If I do this while on the first card of the stack:

    put the long id of control 76 of card 1 of stack <myStack>

I get something like this:

field id 1051 of group id 1045 of group id 1004 of card id 2276 of  
stack "PDdata" of stack <stackPath>

But if I move to any other card of the stack, and execute the same  
command, I get:

field id 1051 of group id 1045 of group id 1004 of card id 2675 of  
stack "PDdata" of stack <stackPath>

Note that the card id number in the long id is different, depending on  
which card is current -- despite that fact that I asked specifically  
for "the long id of control 76 of ***card 1*** " both times.

I know that occasionally executing commands via msg box give anomalous  
results, but that appears not to be a factor here.

So I need to be on the same card of the stack every time I fetch long  
id's for controls of that stack, or else my handlers won't work  
properly.

Bug, or what?

-- Peter

Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig

On Mar 4, 2011, at 1:48 PM, J. Landman Gay wrote:

> On 3/4/11 12:38 PM, Bob Sneidar wrote:
>> I wonder if that triggers an openCard event?
>
> No. I don't think it triggers any messages.
>
>>
>> Bob
>>
>>
>> On Mar 4, 2011, at 10:05 AM, Peter Brigham MD wrote:
>>
>>> Just discovered a trick I didn't know about. This is in the IDE,  
>>> BTW. I needed to have the first card of one of my stacks as the  
>>> current card, while I do something from another stack (a utility  
>>> stack). If I "go card 1 of stack<stackName>" then the  
>>> stack<stackName>  comes to the front, but I want to keep the  
>>> utility stack as the topstack, so even following this by "go back"  
>>> or some such looks messy on screen. Instead, I can do this:
>>>
>>>   set the currentcard of stack<stackName>  to \
>>>           the short name of card 1 of stack<stackName>
>>>
>>> and it all happens in the background.
>>>
>>> Probably others knew about this, but I didn't, so I'm posting it  
>>> for those like me for whom it is a new trick.
>>>
>>> -- Peter
>>>
>>> Peter M. Brigham
>>> pmbrig at gmail.com
>>> http://home.comcast.net/~pmbrig
>
> -- 
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
>
> _______________________________________________
> 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