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

XOBSERVE with xdisplay and xguid not updating #169

Open
m-kim opened this issue Jul 23, 2019 · 1 comment
Open

XOBSERVE with xdisplay and xguid not updating #169

m-kim opened this issue Jul 23, 2019 · 1 comment

Comments

@m-kim
Copy link

m-kim commented Jul 23, 2019

Hello all,

I'm trying to use a slider so I can skim through some images I have. However, it appears that if I use

xcpp::display(img,id, active);

in XOBSERVE the display is not updated. I'm happy to dump my unit test here, but I put it in github, as well as on mybinder.

Expected outcome: Move the slider, and xcpp::display will display an image. Move the slider past 50, and a different image will replace the previous image in the same position as before.
Actual outcome: The image never changes.

What am I doing wrong here?

Cheers,
Mark

@Sreevis
Copy link

Sreevis commented Feb 18, 2021

Hi @m-kim ,

I also tried to get the live access of slider using XOBSERVE.
xw::slider<double> slider;
slider.display()
XOBSERVE(slider, value, [](const auto& s) { std::cout << "Observer: New Slider value: " << s.value << std::endl; });

The above sample code from xwidget docs is not showing any output. Not sure the way which I am using it is right or not.
Please help if you have found any solutions or alternatives.

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

2 participants