Data in fields(cards) instead of custom properties?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
gyroscope
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 404
Joined: Tue Jan 08, 2008 3:44 pm
Contact:

Data in fields(cards) instead of custom properties?

Post by gyroscope » Sun Mar 15, 2009 1:18 pm

Hi, I've been reading a webpage here:

http://www.nabble.com/the-Visible-Varia ... 21244.html

One of my projects is my own Rev script collector (something that a few other people have done before, I know). I'll be honest, keeping each set of records in a custom property has confuddled me; i.e still don't quite understand the principle/process.

So I'm going down the route of each record set as a new card. Reading the above posts, it seems that in the main there aren't any speed considerations to worry about.

But what about number of cards? i.e eventually one could land up with 3000 cards or more, i.e 3000 separate record set entries. Would this be a problem in any way does anyone know please :?:

Edit: just read a reply by Sarah:
I make sure that each data field, check box,menu button or radio
button has it's own unique name, then I collate all these names & the
name of their card into a custom property of the data stack. I have
generalised setData, getData handlers & functions that look at this
list, find the appropriate data object on it's card, and either change
or return it's value.
If anyone could post a small stack on Rev Online showing these principles, i.e specifically with commented stuff about putting the whole card containing the record set and retrieving and putting from a custom property, I'd be soooo grateful, thank you.:roll: (Bit much to ask though, I know...)

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Sun Mar 15, 2009 3:39 pm

Hi gyroscope,

i have a very simple database example on RevOnline, which uses custom properties. You'll find it under user name Mark.

Once your stack has more than 10000 cards, you will notice that the find command slows down considerably. Obviously, repeat loops that search data in an objecet on a particular card will get slower as the number of cards increases. These problems can be avoided by using custom properties, files, single data fields, and some other methods.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

gyroscope
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 404
Joined: Tue Jan 08, 2008 3:44 pm
Contact:

Post by gyroscope » Sun Mar 15, 2009 7:09 pm

Thank you Mark, that gives me some ideas.

It's interesting to see that adding a record set in your stack example doesn't actually add a card; all info is called up on the same card. I guess there might be an advantage to this, i.e inputting custom properties as text on the same card?

:)

Post Reply