Why is the following necessary:

GtkSpinButton *spin;
gchar buf[32];
sprintf (buf, "%0.*f", spin->digits, gtk_spin_button_get_value_as_float (spin));

?

double john;
john = gtk_spin_button_get_value_as_float (spin);

will set john to either the displayed value or a value just a bit above or
below the displayed value, even if that value is explicitly typed into the
spinbutton in by the user (never mind the value displayed after a bit of
slewing).

I've never seen this bogus round-off problem explained.  Code examples like the
one involving spin->digits are cited without explanation.

John

-- 
John GOTTS <[EMAIL PROTECTED]>  http://linuxsavvy.com/staff/jgotts

_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to