You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Kevin Menard <km...@servprise.com> on 2008/03/20 02:16:32 UTC
Working with Modeler Preferences
Hi,
I've been banging my head against the modeler code for the past couple
hours. I'm kinda at an impasse as to how to load and persist arbitrary
values to the underlying HSQLDB store.
I've done something like the following:
PreferenceDetail pref =
Application.getInstance().getPreferenceDomain().getDetail(GeneralPreferences
.DELETE_PROMPT_PREFERENCE, true);
But, I wasn't quite sure how to save the values. I tried:
Application.getInstance().getPreferenceService().savePreferences();
But when I reload the modeler, my preference value doesn't load.
Any info would be much appreciated.
Thanks,
Kevin
Re: Working with Modeler Preferences
Posted by Kevin Menard <km...@servprise.com>.
Indeed, that did the trick. Well, now I feel much better about my ability
to follow code.
--
Kevin
On 3/20/08 2:29 AM, "Andrus Adamchik" <an...@objectstyle.org> wrote:
>
> On Mar 20, 2008, at 3:16 AM, Kevin Menard wrote:
>
>> But when I reload the modeler, my preference value doesn't load.
>
> Possibly you've ran into the long standing bug with preferences that
> results in HSQLDB leaving dead lock files. If that happens, on next
> startup would clone the DB and work off a clone. To start clean you
> may do this: close the Modeler and run "rm -rf ~/.cayenne/prefs/1.2/".
>
> Andrus
Re: Working with Modeler Preferences
Posted by Andrus Adamchik <an...@objectstyle.org>.
On Mar 20, 2008, at 3:16 AM, Kevin Menard wrote:
> But when I reload the modeler, my preference value doesn't load.
Possibly you've ran into the long standing bug with preferences that
results in HSQLDB leaving dead lock files. If that happens, on next
startup would clone the DB and work off a clone. To start clean you
may do this: close the Modeler and run "rm -rf ~/.cayenne/prefs/1.2/".
Andrus