[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XForms] Unexpected behavior with fdesign and slider return setting

From: SBP
Subject: [XForms] Unexpected behavior with fdesign and slider return setting
Date: Tue, 20 Oct 2015 18:55:17 -0500

Hi there!

I think I just found a bug regarding sliders and their use with
fdesign. This refers to xforms-1.2.4.

It turns out that when setting the return setting for a slider to
FL_RETURN_ALWAYS, fdesign emits no code nor saves this setting in
the .fd file.

Why is that? Because its behavior is to not emit return settings that
are equal to the object's default value. That's ok. However, digging in
the slider code, I found out that whereas the default for the slider
object is FL_RETURN_ALWAYS as per the fl_make_object call within
create_slider, the function add_slider changes this to
FL_RETURN_CHANGED, so that any slider we add to a form has this default
behavior (as the manual says). What happens is that fdesign takes its
default settings from the create_ function, not the add_ function, so it
recognizes the default return setting for a slider as FL_RETURN_ALWAYS
when actually it's FL_RETURN_CHANGED.

I don't know if other objects suffer from this, but I'm thinking the
add_ functions shouldn't change the object defaults, that's what the
create_ functions are for. If this is done, fdesign will behave



reply via email to

[Prev in Thread] Current Thread [Next in Thread]