novice question re "marked" and customkeys

Peter Brigham MD pmbrig at gmail.com
Thu Mar 31 19:57:28 EDT 2011


"mark cards where..." is very fast and very flexible. Using a  
(possibly hidden) checkbox button should be quite feasible even with  
lots of cards. To "unbark all" you can loop through all the cards and  
set the hilite of the button to false -- be sure not to *go* to the  
cards, just loop through them by reference -- and that should be quite  
fast as well. (set the hilite of btn "barked" of marked card n to  
false) Or, 'mark cards where the hilite of btn "barked" = true' and  
then loop through the marked cards, set the hilite of btn "barked" to  
false, then unmark all cards. Cycling through the cards by reference  
is fast ('set the hilite of btn "barked" of marked card n to false')  
-- always, always, always avoid things like "go card n" within a loop,  
since that takes lots of time.

-- Peter

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


On Mar 31, 2011, at 7:07 PM, Pete wrote:

> I think Mike's solution is the best.  I didn't know you could mark  
> cards in
> the way he suggested - doesn't seem much point in rolling your own  
> when LC
> can do it for you.  I guess the performance thing could be an issue  
> if you
> can't use a custom property and there's a large number of cards.
> Pete
>
> On Thu, Mar 31, 2011 at 1:33 PM, Timothy Miller <
> gandalf at doctortimothymiller.com> wrote:
>
>> A big thankya goes out to Peter, Mike, Bob and Peter. Good ideas all.
>>
>> Tim
>>
>>
>> On Mar 31, 2011, at 10:49 AM, Peter Brigham MD wrote:
>>
>>> I suspect that using a customproperty of the card would be faster  
>>> for
>> large numbers of cards. Accessing the contents of a field is slow,  
>> relative
>> to pulling customprops. But it probably doesn't matter unless you  
>> have >1000
>> cards.
>>>
>>> -- 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
>>
>>
>
>
> -- 
> Pete
> Molly's Revenge <http://www.mollysrevenge.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