Cards vs Listfield/custom properties revisited
Lars Brehmer
larsbrehmer at mac.com
Thu Jan 24 12:49:03 EST 2008
I followed the discussion about using stacks of many cards vs. a
listfield vs. a custom property vs. a database.
I use a data stack with around 5,000 cards with anywhere from 4 or 5
to over a hundred custom properties in each (out of 250 possible), so
I decided to try everyone's advice. I created a custom property with
1 line with up to 250 items for each of the data cards.
My first speed tests were quite promising at first (example: what took
1765 milliseconds the card way took just 60 milliseconds the new way.)
Being a non coder type (please be patient with my lack of expertice),
I haven't been able to find ways to translate all of the search and
sort operations I do. Most things rely on the very basic
mark cards where some custom property = some condition
lock screen
lock messages --the data stack has an openCard handler that affects my
main stack
repeat for q = 1 to the num of marked cards
go next marked card
do something
end repeat
unmark all cards
--mark cards the way they were before this operation
unlock messages
unlock screen
While this has always been fast enough for me, I am trying to learn
better ways to do things, but after trying such things as filter with
or match etc, I have found no way do something that has the same
result as "mark cards where ...". Is there anything that would have
the effect of the (apparently not possible) command "mark lines in it
where ..."? I suppose it would look something like this:
put the mData of this stack into gData --loads that big custom prop
somehow get rid of lines where something is not in a certain item of
those lines
set the tempData of this stack to gData
do things with the tempData of this stack
I have been fiddling with this in my amateurish way for a couple of
days now, and would really appreciate a simple to understand push in
the right direction.
Cheers,
Lars
More information about the use-livecode
mailing list