novice question re "marked" and customkeys

Peter Haworth pete at mollysrevenge.com
Thu Mar 31 13:47:12 EDT 2011


One possibility would be to maintain a list of the "barked" cards somewhere, maybe in a custom property of your main stack.  You could do that with a setProp handler for "barked" that added the card ID to the master list if the property was set to true and removed it if it was set to false (assuming "barked" is a custom property).  

Once that list is in place, write some simple list navigation handlers like goNextBarked, goPrevBarked, etc.

Pete Haworth

On Mar 31, 2011, at 10:18 AM, Timothy Miller wrote:

> Hey dudes,
> 
> The "marked" property is so easy to use. "go next marked" and "unmark all cards" are so fast and foolproof! Very handy.
> 
> I'm wondering if I can somehow define my own versions of "marked"
> 
> E.g., in a hypothetical stack, the "marked" of cards 3, 10, 22 and 99 is "true"
> 
> I somehow define my own properties, like "barked" and "darked"
> 
> In the same hypothetical stack, the "barked" of cards 1,2, 3 and 4 is "true"
> 
> the "darked" of cards 2,4,6,8 and 99 is "true"
> 
> Somehow I could "go next barked" or "go next darked" just as fast and easy as I could "go next marked"
> 
> In this perfect world, I could "unbark" or "undark" all cards as easily as I could unmark them.
> 
> I suspect this isn't really possible. I suspect the closest equivalent would be to use customkeys and repeat loops, to find the next card with a certain value of a certain customkey, and so on. I suspect this would be somewhat slower than "go next marked" or "unmark all"
> 
> The marked of a card resembles a customkey, but I suspect it works differently. True?
> 
> Is it possible to "go next" to a card with a certain value of a certain customKey? Or is it necessary to use a repeat loop to inspect the each card until I encounter the customKey and value I want?
> 
> Is it possible to "set the poodleNose of all cards to empty"? I suspect not.
> 
> Am I getting this right? Am I missing anything important?
> 
> Thanks in advance,
> 
> Tim
> _______________________________________________
> 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