Mike Bray (Quote Loader Author)'s Avatar

Mike Bray (Quote Loader Author)

08 Jun, 2015 11:17 AM

I wish to save key/value pairs rather than use the Java Preferences class that uses the Windows registry. I have looked at the new class for local storage which Sean hinted at last year prior to the release of 2015 and I have few questions on how to use them.

I see that MoneydanceSyncableItem implements SyncableItem which in turn uses the SyncRecord a subclass of Hashmap. MoneydanceSyncableItem has helper methods to add key/values to a map. Do these values get saved automatically or do I need to use the writeSet/ReadSet methods within SyncRecord? Does that mean I should use LocalStorage to provide the dataset and then use MoneydanceSyncableItem to manage the content of the file?


  1. Support Staff 1 Posted by Sean Reilly on 08 Jun, 2015 12:09 PM

    Sean Reilly's Avatar

    Hi Mike,

    The MoneydanceSyncableItem objects will be saved and synced automatically through the syncing system, although I recommend not to do that (yet) with your own subclasses until we've tested that more.

    To know how you should store your data it'd be great to know what that data is. If it is associated with an account, transaction, budget item, etc then it should probably be stored in one of those items.


  2. 2 Posted by Mike Bray (Quot... on 08 Jun, 2015 01:18 PM

    Mike Bray (Quote Loader Author)'s Avatar

    Thanks Sean

    I have two sorts of data:

    1. parameters for my budget extensions which is a combination of account names and budget amounts. In my extensions I allow the user to select subsets of the categories. I am currently storing these in my own files in the document folder using object serialisation.

    2. Window sizes so if a user resizes the window it remembers the size for next time. I am using Java Preferences for this but on Windows you always get errors as it is writing to the registry. (see It does work but you always get these errors and I wanted to eliminate them.

    It is type 2 I wanted to store within MD. I might move type 1 to your new system at some time so the data is all managed within MD but that can wait.


  3. Mike Bray (Quote Loader Author) closed this discussion on 13 Jun, 2015 04:58 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

29 May, 2024 07:01 AM
29 May, 2024 06:26 AM
29 May, 2024 12:43 AM
28 May, 2024 11:59 PM
28 May, 2024 11:10 PM