[pygtk] Signal with a float argument
Ed Catmur
ed at catmur.co.uk
Wed Jan 31 06:23:43 WST 2007
On Mon, 2007-01-29 at 18:15 +0100, BJörn Lindqvist wrote:
> ...
> gtk.binding_entry_add_signal(Foobar, gtk.keysyms.m, 0, 'ring_loud',
> float, 12.0)
> ...
> gtk.bindings_activate(f, gtk.keysyms.m, 0)
>
> When running the above code on Windows it produces the following output:
>
> RINGING! Hello olle
> RINGING 5.92878775009e-323
>
> That is wrong, the second line should have been "RINGING 12.0". Is it
> a bug in PyGTK or am I doing something wrong?
And on Linux. Evidently a bug in PyGTK; 5.92878775009e-323 is (on
x86-32) (long long) 12 aliased as double.
Ed
More information about the pygtk
mailing list