chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Define-external error


From: felix winkelmann
Subject: Re: [Chicken-users] Define-external error
Date: Tue, 8 May 2007 07:51:00 +0200

On 5/7/07, William Ramsay <address@hidden> wrote:
This is basically the code I am using:

#>?
 int g_signal_connect(void *, char *, void *, void *);
<#

(define-external (setColor ((pointer "GtkWidget") widget)
                   (c-pointer num))
   void
   (printf "num = ~A~%" num))

....
   (let
      ((cbut (gtk_color_button_new_with_color "#ffffff")))
....
      (g_signal_connect cbut "color-set" #$setColor ????? )

The question is what do I put where the ????? are?    The Gtk docs state
that the "color-set" signal will return the widget that called the
signal and "user data" as a gpointer.    No matter what I try I get a
"not a pointer error" - including (make-locative x) which bombed when I
tried to reference it with (locative-ref ..).    You must be able to do
this, I just don't know how.    (I have a workaround, but I would still
like to know how this is supposed to work).


But this is different from the error you reported previously, right? (setColor
not being able to be be converted to a locative)

If you want to pass an integer wrapped in a void-pointer, I suggest

(use lolevel)

(address->pointer 1)


cheers,
felix




reply via email to

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