[EMAIL PROTECTED] writes:
> Why does gtk_spin_button_get_value_as_float() sometimes return an inexact
> value? There are two cases where it does this, (1) being the most severe:
>
> 1) The user types in a number like 3.21. gtk_spin_button_get_value_as_float()
> returns 3.20999 or 3.21002.
>
Because floats are fairly inexact. In GTK 2 it's been changed to
double.
> 1) The exact keyed in value or the visible value if the arrows were used, or
> 2) Only the visible value no matter how it got there.
You could use the fact that spin button is a GtkEntry, and maybe parse
its contents with strtod().
Havoc
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list