Rev Mentor

Tips, tricks & commentary for Revolution developers 
« Back to blog

Why use a text file? Stacks are small!

Many Revolution developers use text files to store data for various small or large chores. If the data is only going to be used by your Revolution-built application, you might consider using a stack file instead of a text file. Here's why:

As you can see, the file size is 110 bytes. Not kilobytes, BYTES. Also, with a stack, you can use custom properties, UI elements, logic, reminders as to the purpose of the file, etc.

Loading mentions Retweet
Posted by Jerry Daniels 

Comments (2)

Nov 13, 2009
A very basic question, since I havn't tried this before:

What is the best way to save the data itself in a stack instead of a text file? Do I simply keep the data in a text field or a custom prop and then "Start Using" the stack from the main stack's preOpen/open handlers? I usually have a up to a few thousand lines of data with perhaps 10-20 items on each line.

Nov 13, 2009
Jerry Daniels said...
If you don't need to "see" the data, I'd recommend a custom property. You can make the data stack a library if you wish, but it's certainly not mandatory. Key is to keep all this simple. And don't forget to save the stack after a write or an update!

Leave a comment...

 
Got an account with one of these? Login here, or just enter your comment below.
Posterous-login    twitter