There's no built-in preferences class in Objo - that snippet was just paul3252's own code. The idiomatic way is to persist a small JSON file yourself and save it at the right point in the app or window lifecycle.
When the next release drops, the docs will be updated with a guide covering exactly this: Persisting Preferences
In short:
- Store settings under
SpecialFolder.ApplicationData in a subfolder named after your app's bundle identifier, not SpecialFolder.Temporary, which the OS may clean at any time (that's why preferences there can silently vanish)
- Use
JSONItem rather than positional text lines as it's self-describing, so adding settings later doesn't break files saved by older versions
- Save application state from
App.Closing() and window placement from the window's Close event, where Left and Top now reliably hold their final values (per the fix above)
The guide includes a complete worked example: an AppSettings module with SaveWindowPlacement and LoadWindowPlacement methods that remember any window's position and size, tolerate corrupt or missing files, and are easy to extend with your own settings.