I want to store, then restore, a bunch of FolderItems in a file, using:
FolderItem.GetSaveInfo
The FolderItem(s) are in a Listbox RowTag (and I know how to store / restore from / to these RowTags),
I know how to Open, Write / Read using BinaryStream.
What I have troubles with is to store / restore multiple file definitions into a single file.
Clue(s) is/are welcome.
for a listbox just put the folder item in the listbox.
GetSaveInfo is to store them in preferences file, database or other data files.
I can also use it to store/retrieve for a Recent Items
Menu
Ths Listbox is just the used prototype
Since hard disk nowadays are largest seen since the early days of this industry, I can store one file description in a text file
in the application data folder.
Why bother to be compact ?
Sometimes I wonder
[quote=322330:@Emile Schwarz]I can also use it to store/retrieve for a Recent Items
Menu
Ths Listbox is just the used prototype
[/quote]
For a Recent Items menu, I would recommend using the Apple one on the macOS if you want to sell in the Mac App Store, this is part of the Sandbox Kit.
Otherwise, I would recommend using a binary file format, write a Uint32 which is the length of the saveData, then the saveData.
In order to work with the App Sandbox you have to use Apple approved methods, for a recent items menu they have an API for that, the Sandbox Kit wraps this API into a Xojo friendly interface.
I found this after working with App Sandboxing for so long and thinking that there must be an easier way, it wasn’t I looked into trying to support Apple’s ‘Resume’ did I discover this and other functions (such as how to hack ‘Resume’ into a Xojo based application).
[quote=322608:@Emile Schwarz]@Sam Rowlands Otherwise, I would recommend using a binary file format, write a Uint32 which is the length of the saveData, then the saveData.
Nice idea, thank you.[/quote]
No worries, I work with binary data quite a bit.