Problem with Edit Object Store functionality in simulator?

I'm using the "Edit Object Store" functionality in the simulator to check various changes. However, when I click "OK" my widget restarts but the values remain the same. This is making it hard for me to debug. Furthermore, if I change the value in the properties.xml file and re-run the app the original value is still used. The only way I seem to be able to get the value to update is to use the "App Settings Editor" and send a new configuration to the simulator, which makes sense for "settings" but not necessarily for properties not assigned to settings per se. Am I missing something?

Furthermore, I'm unsure how the widget will react if I change one of these properties in the future.

For reference, I'm using SDK 1.2.11 on a Mac (with latest Eclipse).

Thanks,
Douglas
  • I've noticed this, and was also about to raise a Post. So something may have changed.

    I've also noticed, if you have the same Property Name on two Apps, they seem to overlap, and changing one, changes the other.
  • The object store and settings (properties) are actually two different things. The Object store is a .str file (in the Data directory) and settings are in a .set file (in the Settings directory) When you define something as a property, it winds up in the .set file, not the .str file.

    If you look at the ObjectStore sample, it does both Object Store and Settings. The first screen is the OS, and you can change stuff with the OS editor in the simulator. The second screen are properties, that you change with the app-settings editor in Eclipse.

    It's confusing in that accessing the OS and settings (properties) are done using the same calls. In the case of the sample, the OS keys are numbers, and the settings keys are strings.

    Run the ObectStore sample (it was expanded to include settings (properties) in 1.2.1), and see the difference in how things work on the two different pages, and what is used to edit either.
  • The object store and settings (properties) are actually two different things. The Object store is a .str file (in the Data directory) and settings are in a .set file (in the Settings directory) When you define something as a property, it winds up in the .set file, not the .str file.

    If you look at the ObjectStore sample, it does both Object Store and Settings. The first screen is the OS, and you can change stuff with the OS editor in the simulator. The second screen are properties, that you change with the app-settings editor in Eclipse.

    It's confusing in that accessing the OS and settings (properties) are done using the same calls. In the case of the sample, the OS keys are numbers, and the settings keys are strings.

    Run the ObectStore sample (it was expanded to include settings (properties) in 1.2.1), and see the difference in how things work on the two different pages, and what is used to edit either.


    I looked at the ObjectStore sample and I am using properties in the same way that the sample does. The sample calls them "runtime properties" and "default properties". There are four "default properties" and those are listed when I bring up the Edit Object Store window. The runtime properties are set/unset within the code and are not editable anywhere.

    Regardless of the confusing names in the sample app, the outcome with 1.2.11 is the same; if I change anything in the OS (there are four settings/properties) the app restarts and whatever I change is reset back to the default value within the simulator.
  • I looked at the ObjectStore sample and I am using properties in the same way that the sample does. The sample calls them "runtime properties" and "default properties". There are four "default properties" and those are listed when I bring up the Edit Object Store window. The runtime properties are set/unset within the code and are not editable anywhere.

    Regardless of the confusing names in the sample app, the outcome with 1.2.11 is the same; if I change anything in the OS (there are four settings/properties) the app restarts and whatever I change is reset back to the default value within the simulator.


    Do you have the same key in your .str and .set files? (that could be a problem) If you use sting keys, you should be able to display the .set and .str and see the keys for files in the simulator. Have you tried deleting the .str and .set file for your app in the sim's temp directory?

    In the ObjectStore sample, "DefaultProperiesView.mc" deals with the proprieties you can change with the App Settings Editor in Eclipse (in the .set file). ObjestStoreView.mc deals with the Object Store that you can edit from the Sim's Object Store Editor (the.str file) (as well as the main view).


    update2:... OK, things are different between 1.2.x and 2.1.x. I think I see what you're seeing now... (2.1.x handles this much better)
  • I actually thought about deleting the .STR and/or .SET files for the simulator but I couldn't find where those are stored. Any ideas on where to look for those (I'm on a Mac).

    Cheers,
    Douglas
  • Former Member
    Former Member over 9 years ago
    I have always had the same problem. It is something that Garmin should fix, and maybe they have .. but I would be interested in finding that out. Glad it is not only me with this issue. I am using 1.2.9 btw.
  • I actually thought about deleting the .STR and/or .SET files for the simulator but I couldn't find where those are stored. Any ideas on where to look for those (I'm on a Mac).

    Cheers,
    Douglas


    I'm not an Apple person (last time I used an Apple was the "Apple Lisa" which came out before the first mac! ), but I know people have posted how to find the sim's temp directory here a number of times here. Maybe a mac person can point you to it again...
  • I'm not an Apple person (last time I used an Apple was the "Apple Lisa" which came out before the first mac! ), but I know people have posted how to find the sim's temp directory here a number of times here. Maybe a mac person can point you to it again...


    My mistake; I should have searched the forums for that. For reference, here is the thread discussing the temp directory on Mac -- https://forums.garmin.com/showthread.php?322594-Where-is-simulator-object-store-file-stored-on-Mac-OSX
  • Former Member
    Former Member over 9 years ago
    update2:... OK, things are different between 1.2.x and 2.1.x. I think I see what you're seeing now... (2.1.x handles this much better)


    SDK 2.1 does not work either ... I am using Windows 10 and how do I get it to work in the simulator ?? I do AppSettingsEditor .. change the value and nothing happens.

    What files do I need to zap in order for this to be reset ???
  • SDK 2.1 does not work either ... I am using Windows 10 and how do I get it to work in the simulator ?? I do AppSettingsEditor .. change the value and nothing happens.

    What files do I need to zap in order for this to be reset ???


    To reset your object store, delete apps\data\<yourprogram>.str To reset your app settings, apps\settings\<yourprogram>.set

    With 2.1.x, Edit Object Store in the sim is only the Object Store. (in 1.2.x, it showed both OS and settings (properties))

    If you change something with the App Settings Editor, are you using onSettingsChanged() in your app class to detect things changed in your settings(properties)

    note: with 2.1.x, the first time you run your app, the Object Store Editor won't have anything. It will after you exit your app and then you run it again. App Settings in Eclipse will show the default you set for the property. You don't have a property line in the xml for things in the object store, so it has no default.