Hmm, just a random question but is this an application that you will have other people use in the future? Or will it only be used by you or a few people whom you personally made the software for? The reason I'm asking is because while it
is the easiest to save the stack to the rev file, it would still be best to use another storage medium aside from the rev file. For example, instead of having the DataGrid data be saved to the stack it resides on, you can have it be saved to an SQLite database which is in the form of a local file. Also there's the
arrayEncode function that you can use so that you can store the data to an array variable then output it to a local file. If it
is just a personal project for use by few people you know or just yourself, I guess it's okay (although I still won't recommend) saving it to the stack where the DataGrid resides on.
lohill wrote:Since these are datagrids the 'simplest' way is to write to .txt files rather than to .csv. That is because the dgText is already tab delimited data.
There's also another problem here, as you update or try to implement new features or columns to your DataGrid, you will see that relying solely on the tab delimited items will be a problem in the future if you will be dealing with binary data. As for the
.txt and
.csv difference, you can simply parse the contents with a command like
Code: Select all
replace tab with comma in tMyVariable
with
tMyVariable being the one that contains those tab-delimited DataGrid contents. A CSV is simply a text file with contents that are comma delimited.
lohill wrote:Getting back to what I'm looking for is a way to offer the user a chance to save the stack, not save the stack or even cancel the quit. I want this to happen on either the close of the stack or when the quit application is chosen.
You lost me at the underlined words above.