gp_widget_get_value returns old values

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

gp_widget_get_value returns old values

eric middelkoop
Hi,

When calling gp_widget_get_value() I noticed that when I only create the widget once and reuse it, the call will always return the same value, even if I change my camera settings (Nikon D800).

It seems that if the widget is created new for every call to gp_widget_get_value(), I get an actual value.

Is this intended behaviour or a bug? Seems like a waste of resource to recreate the widget every time.

--
Kind regards,
Eric

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|

Re: gp_widget_get_value returns old values

Marcus Meissner
On Sun, May 22, 2016 at 10:57:54AM -0400, eric middelkoop wrote:

> Hi,
>
> When calling gp_widget_get_value() I noticed that when I only create the
> widget once and reuse it, the call will always return the same value, even
> if I change my camera settings (Nikon D800).
>
> It seems that if the widget is created new for every call to
> gp_widget_get_value(), I get an actual value.
>
> Is this intended behaviour or a bug? Seems like a waste of resource to
> recreate the widget every time.

camera_get_config* returns a static snapshot of the configuration tree/widgets.

So if you want to have the current changes, you need to query the widget / tree
again.

Ciao, Marcus

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel