novice question re "marked" and customkeys

Bob Sneidar bobs at twft.com
Fri Apr 1 12:43:16 EDT 2011


Yes I did figure it out. I was getting the ID of this card, which always seems to refer to the first card that the group the button belonged to was placed on, hence always getting 1002 for the ID. Getting the name seems to do the same thing. But getting the NUMBER returns the correct result. As I said in another post, I find that odd, but I am probably not seeing the "big picture". 

Bob


On Mar 31, 2011, at 10:39 PM, Timothy Miller wrote:

> Bob's experience, quoted below, seems odd. I don't think this is normal LC behavior. Something has gone wrong, it seems. I might have missed a reply to Bob that explains it, but I didn't see one.
> 
> Did you ever figure it out, Bob?
> 
> 
> on mouseUp
>   push card
>   set lockscreen to "true"
>   set lockmessages to "true"
>   put the number of cards into tNum
>   repeat with i = 2 to tNum
>      if the shiftkey is down then exit repeat
>      set cursor to busy
>      go to card i
>      put the id of this card & return after tCardId
>   end repeat
>   pop card
>   put tCardId
> end mouseUp
> 
> I tried this in a card button and a background button. It worked fine, either way. No duplicate card IDs. 
> 
> Reply to Peter:
> 
> "Mark cards where..." Oh! That is awesome! I'd forgotten about that command.
> 
> Also forgot about "mark cards by finding "x" in field "y"
> 
> Also forgot about "unmark cards where..." and "unmark cards by finding..."
> 
> These commands combine simplicity with blazing speed. You can do a lot with them. Thanks for reminding me.
> 
> Cheers,
> 
> 
> Tim
> 
> 
> On Mar 31, 2011, at 1:31 PM, Bob Sneidar wrote:
> 
>> Okay I was going to make a demo stack of how to do this, but I have run across a problem someone was talking about earlier and I didn't get it then but I sure do now! 
>> 
>> In a button as part of a background group on a card I have:
>> 
>> On mouseUp
>>  put the id of this card into theFirstCard
>>  go next
>>  put the id of this card into theNextCard
>> end mouseUp
>> 
>> THEY ARE BOTH THE SAME!!!!! How can that be? How can I get the ID of the CARD THAT IS CURRENTLY SHOWING? Not the CARD THAT THIS SCRIPT STARTED AT? (not shouting just capitalizing for emphasis). 
>> 
>> Bob
> 
> _______________________________________________
> 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