Skip to content

ability to force event callback? #92

Description

@tyhenry

Hi -
thank you again for the fantastic addon.

I have a question: is there a way to force a component to run its assigned callback?

For instance, in setup():

  • I assign a callback function to a component
  • then manually set a default value for the component
  • then would like the component to run the callback for that value

i.e.:

gui = new ofxDatGui(0,0);  
ofxDatGuiSlider* rpmSlider = gui->addSlider("rpm", 7.0,18.0);  
rpmSlider->onSliderEvent(this, &ofApp::changeRpm);
rpmSlider->setValue(10.0);  
rpmSlider->**[force event callback here?]**;  

Thanks!

[Note: I'm using both lambda and normal callbacks so would be great to have a solution that works for both.]

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions