GithubHelp home page GithubHelp logo

Load settings about ofxdropdown HOT 6 CLOSED

joaoffreire avatar joaoffreire commented on August 27, 2024
Load settings

from ofxdropdown.

Comments (6)

johnnyboss avatar johnnyboss commented on August 27, 2024 1

I was in the previous commit. Updating it seems to have solved the problem. I'll close it thank you.

from ofxdropdown.

roymacdonald avatar roymacdonald commented on August 27, 2024

Hi,
thanks for letting mi know.
I will check that, as the getAllSelected function returns a cached vector, so it is not needed to get filled each time you call it, although selectedVAlue should hold something.

from ofxdropdown.

johnnyboss avatar johnnyboss commented on August 27, 2024

Sorry to get back to this but this is driving me insane. Even running your example doesn't load the settings on startup. I always have to click the dropdown menu again for it to load correctly.
This: ofDrawBitmapStringHighlight(ofToString(intOptions.get()), 20, ofGetHeight() - 50);
Always return a random value until I reselect an option. Shouldn't it just load from the settings and accept the loaded value?

from ofxdropdown.

roymacdonald avatar roymacdonald commented on August 27, 2024

Hi @johnnyboss are you actually loading the gui settings from a file at startup? I ask because it does not happen automatically. Thus you need to explicitly call for such.
gui.loadFromFile("settings.json");//or whichever file you want to load from
Make sure you call it after you have setup all the gui and dropdowns.

from ofxdropdown.

johnnyboss avatar johnnyboss commented on August 27, 2024

Screenshot from 2023-01-07 13-57-09
As you can see the option loaded is 11 but on the bottom it's an undefined value. This is from your example and I added the
gui.loadFromFile("DropdownsSettings.json");
on the last line of the setup()

from ofxdropdown.

roymacdonald avatar roymacdonald commented on August 27, 2024

That's odd. It does not happen to me. Is that just the example? Which OF version are you using? Plattform, is ofxDropdown the newest commit?

from ofxdropdown.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.