-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default store.json not written relative to mmj2 path + load/saveSettings() quirk #12
Comments
mmj.util.StoreBoss attachment for review! https://github.com/ocatmetamath/mmj2/blob/ocatmetamath-patch-2/src/mmj/util/StoreBoss.java |
I think the idea here is that
is equivalent to
|
OK, got it. I put those back :0-)
But still, StoreBoss.autoload() ... must not invoke loadSettings() ...
protected void autoload() {
if (!manualLoad) {
//loadSettings(); //can't do this here -- no RunParm in hand.
try {
getStore().load(true);
} catch (final IOException e) {
throw error(e, ERRMSG_LOAD_FAILED, e.getMessage());
}
}
By the way, the User Guide should probably note that
SaveSettings (or any other RunParm) inserted after
the RunProofAsstGUI RunParm execute immediately.
They don't wait for the GUI to terminate. It is started,
not called.
I will update github with the final adjustments today.
… On Oct 3, 2018, at 00:18, Mario Carneiro ***@***.***> wrote:
I think the idea here is that SaveSettings and LoadSettings also take an optional argument in the same format as SettingsFile. That's why they are only calling it when they get more than zero args. That is,
SaveSettings,foo
is equivalent to
SettingsFIle,foo
SaveSettings
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#12 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ApDxkak6GbURxfDK6eFQXRBJXJZLuOnwks5uhGS1gaJpZM4XExeO>.
|
I think all RunParms are synchronous except RunProofAsstGUI. (You would probably know better about this.) Then again, the RunParms file is basically structured as a configuration file so maybe it's not obvious that it's actually a really basic scripting language. |
yes “think all RunParms are synchronous except RunProofAsstGUI. “ true
runparm now misnamed. it
was afterthought. next time
create proper language for
UI of app.
.
… On Oct 3, 2018, at 04:52, Mario Carneiro ***@***.***> wrote:
I think all RunParms are synchronous except RunProofAsstGUI. (You would probably know better about this.) Then again, the RunParms file is basically structured as a configuration file so maybe it's not obvious that it's actually a really basic scripting language.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Ok, I just uploaded the "v2.5.2.1003" mmj2.jar. See https://github.com/ocatmetamath/mmj2/tree/ocatmetamath-patch-2 I did more testing taking into account all my prior "fixes". In other news, fyi, here are my notes from earlier: `2018-10-03: NOTE SETTINGS
ProofAsstHighlightingEnabled,no LoadSettings,OCAT-store-STUFFON.json Clear ` |
OK, here is the "state of play" for Settings, as I understand the intent -- and which my code intends to match. This is the thing. Settings:
|
Ok, I had that bit in #3 wrong: PA GUI File/Load Settings and File/Save Settings do not Here is a redo: `Settings: When a user upgrades to the latest mmj2, Settings is automatically Enabled. Settings are stored in \mmj2jar\store.json and nothing needs to be done by the user. User editing is allowed, and deletion The DisableSettings RunParm may be entered in the RunParms.txt file to prevent any storing The user may choose another file name, instead of store.json. RunParms SettingsFile, Do not input any Settings RunParms after the RunProofAsstGUI RunParm because it AND...It seems clear that the Search Options options need to be added to the JSON Settings |
I finally figured out that "autosave on exit if enabled" is part of our deal with the users to So...I added a save of settings to the File/Exit menu item. That works. Other methods of OK Here is the final on.. Settings: When a user upgrades to the latest mmj2, Settings is automatically Enabled. Settings are stored in \mmj2jar\store.json automatically upon File/Exit from the PA GUI (other exit methods do not save.) Nothing else needs to be done by the user. User editing is allowed, and deletion of \mmj2jar\store.json resets everything to the defaults with the next Load Settings operation. The DisableSettings RunParm may be entered in the RunParms.txt file to prevent any use of settings on disk. In memory Settings are used, of course, but they are not saved between sessions. Any subsequent use of the PA GUI File/LoadSettings or File/SaveSettings has no effect. RunParms referencing Settings (SettingsFile, LoadSettings, SaveSettings) will re-Enable Settings. The user may choose another file name, instead of store.json. RunParms SettingsFile, LoadSettings, and SaveSettings have a name parameter. Do not input any Settings RunParms after the RunProofAsstGUI RunParm because it Be sure to exit the PA GUI via File/Exit to ensure your Settings are saved to disk. That is all. |
Well, what I see is my store.json off somewhere in the /user2 directory, not the mmj2 directory.
That problem does not occur with a relative file name such as ocat-store.json, the program
is careful to resolve the path against mmj2. So I have a little patch for that in mmj2.util.StoreBoss.
Also I noticed that the SaveSettings and LoadSettings functions -- where ever called,
such as PA GUI -- were indirectly invoking the setSettingsFile() function used to process
the SettingsFile RunParm! That is incorrect because that RunParm is gone when PA GUI
is running.
I will upload the fixed StoreBoss later today most likely.
The text was updated successfully, but these errors were encountered: