chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Re: (address->pointer)


From: felix winkelmann
Subject: [Chicken-users] Re: (address->pointer)
Date: Tue, 8 May 2007 14:41:35 +0200

On 5/8/07, William Ramsay <address@hidden> wrote:
Hi Felix,

Using (address->pointer number) does indeed do what I want.    It allows
me to
pick up a user supplied integer in my  "define-external" code.
However, it has
a rather bad side-effect.    The code is handled in a dialog box.   Using

    (g_signal_connect cbut "color-set" #$setColor (address->pointer 1))

will send a 1 to setColor, but it also wipes out my dialog pointer and
crashes the
system on Cancel or Save when I try to destroy it.

Using   (g_signal_connect cbut "color-set" #$setColor #f) works fine.
Adding
(address->pointer 1) is the only  difference.


Sorry, but what exactly is expected in the g_signal_connect call?
As I understand it, the last argument is an arbitrary pointer (userdata)
pass to the callback uninterpreted. If the callback (setColor) just
prints the number, shouldn't it work.

I apologize for being such a Gtk dolt, but I'm just guessing here.


cheers,
felix




reply via email to

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