Persistent data?

Jeanne A. E. DeVoto jeanne at
Fri Feb 1 14:18:01 EST 2002

At 8:48 AM -0800 1/31/2002, Gary Robinson wrote:
>> If your database needs are simple enough, you can use a stack as a
>> flat-file database (where each card is a record), using the find, sort, and
>> mark commands to handle selection, searching, and sorting tasks.
>I have a recollection that that was hard to do with early Hypercard, because
>such a stack would have its top record visible to the user. You seem to be
>implying that that is not the case in Revolution, that you can have a stack
>that is just used as a database and is not part of the UI?

Yes. You can have multiple stacks open, hide some of them, or whatever.

>Does the find facility involve any kind of an index, or does it actually
>have to check every card in the stack to see if it meets criteria?

I think it checks a hash on each card. No index, no, but it is reasonably
fast. (Under a second on a Tibook 400 to locate a word that turns up only
at the end of a 3-megabyte stack, almost all the data in which is text.)

>> You can
>> also store data in external files and pull their information in as needed,
>> and store media such as images in external files that can be referenced
>> from within a stack.
>But is there an easy way to store such data in a file that allows keyed
>access, such as Python's shelf library allows?

Maybe you could explain a bit about what Python's keyed access lets you do?
I'm not completely sure how to answer that question.

Jeanne A. E. DeVoto ~ jeanne at
Runtime Revolution Limited - Power to the Developer!

More information about the Use-livecode mailing list