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

Getting realtime update of xwidget events #224

Open
Sreevis opened this issue Feb 22, 2021 · 0 comments
Open

Getting realtime update of xwidget events #224

Sreevis opened this issue Feb 22, 2021 · 0 comments

Comments

@Sreevis
Copy link

Sreevis commented Feb 22, 2021

Hi,

I was trying to get the realtime value of the slider movement.
I was able to get it using xobserve.

xw::slider<double> slider;
slider.display()
XOBSERVE(slider, value, [](const auto& s) {
std::cout << "Observer: New Slider value: " << s.value << std::endl;
});

But when I try to use the slider value in another cell, it is not running simultaneously.
I also tried using capture variable.

Any Idea to get the slider value update simultaneously in a loop running in another cell?

Thanks,
Sreevishnu

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

1 participant