Skip to content
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

No parameter recall from xml (parameter "found in XML but not defined in source code!") #26

Open
DonGuig opened this issue Nov 12, 2018 · 5 comments

Comments

@DonGuig
Copy link

DonGuig commented Nov 12, 2018

Hi,

No matter what, I can't get parameters to get back to their state. I'm compiling again ofx 0.10.0 on macos 10.12.6.

The preset values get stored correctly in the .rui file (i can see it in a text editor), but when I launch the app again, for each parameter i get something like (i activated verbose output) :

[verbose] ofxRemoteUI: Param '0.3.number' found in XML but not defined in source code! Keeping it arround to save back to XML

And the parameter in the running application is back at its default value.

I tried compiling the "example-ofParameter", and it's exactly the same issue. Am I missing something or is this a bug ? Can you reproduce it using the original "example-ofParameter" example ?

@armadillu
Copy link
Owner

Hmm the ofParameter sync features have been neglected for quite a while, I'll have a look.
In the mean time, can you try removing the .rui file?
If you keep a .rui file across different versions weird things can happen.

@DonGuig
Copy link
Author

DonGuig commented Nov 13, 2018

Hi,

Thank you for the reply ! Unfortunately I already tried to remove the .rui file. I also tried various other ways to try and make it work in the code, each time removing the .rui file before concluding anything. But not luck ! It's great if you can have a look.

@DonGuig
Copy link
Author

DonGuig commented Nov 19, 2018

Hi,

I found a workaround : after "RUI_SETUP()" and "ruiBridge.setup(parameters);", you can add :
RUI_LOAD_FROM_XML(); ruiBridge.forceRuiToOfParamSync();

You don't get rid of the error messages I mentioned but those two lines do the job.

The underlying issue is with the initialization process. The RUI_LOAD_FROM_XML() method is first called by RUI_SETUP() but at this point the parameters are not know by the server. It gets the parameters from ruiBridge.setup(parameters), which has to come after.

For some reason the additional RUI_LOAD_FROM_XML() gets the parameters to their value from the XML, but it doesn't reflect in the Gui (I'm using ofxGui to have interaction on the server). Calling ruiBridge.forceRuiToOfParamSync() deals with that.

@armadillu
Copy link
Owner

hmmm I just got around to trying this with the latest OF release (0.10.1) and it seems to work as expected. I made a couple presets from remoteUI and I have been able to load them back, across restarts as well. What was the original problem?

@DonGuig
Copy link
Author

DonGuig commented Nov 25, 2018

That's weird. What you did is a bit different from what I did though. I just tried with of 0.10.1 (was on 0.10.0) and it's still the same.

Here is what I did :
- made a xcode project out of the example-ofParameter of ofxRemoteUI
- built it as it is
- run it, change the size and number parameter
- quit the app
- i check in a text editor that the file "ofxRemoteUISettings.rui" recorded the changes to size and number : it did, no issue here
- I launch the app again, but the size and number parameter are back to their default value, and the console shows these "Param '0.1.size' found in XML but not defined in source code! Keeping it arround to save back to XML" messages.

Could you try checking this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants