On Mon, 14 May 2007 16:54:35 +0200
Nicolas Cannasse <[EMAIL PROTECTED]> wrote:

> > Hi Nicholas
> > 
> > I think I found the error I was doing this
> > 
> > entry.connect(Event.activate(function(w) {  button.label =
> > entry.text;} ));
> > 
> > Now, I get it, cos I have to dereference a haxe string
> > to a neko string and I have to re-wrap the other way too! GReat
> > thanks.
> > 
> > btw, give me a month and haxe won't be a "web oriented" universal
> > language anymore :)
> > 
> > Gtk is going to be nice in haxe, here's a test prog so far, it works
> 
> Great, hope to see it available on haxeLib for Linux/OSX/Windows
> soon :-D
> 
> Nicolas
> 

Nicholas

If I pass an object into and out of C as in this callback to gtk will
the typing in the object be preserved when it's passed back into neko?
Right now in val_call1(func,widget) ; back in haxe i can't access the
fields i think should be there.

value *data = alloc_root(2);
*data = func;
*(data+1)= widget;
g_signal_connect(G_OBJECT(val_data(w)),
                val_string(event),
                G_CALLBACK(signal_callback),
                data);
        

passing it to a gtk callback, where func is a func and widget is an
abstract.

and then dereferencing in the callback like this ...

void signal_callback(GtkWidget *w,void *data) {
        value *p = (value *)data;
        value func =  *p
        value widget = *(p+1);
        val_call1(func,widget) ;
}

problem here .... , nothing in w(idget)?


var enter_ev = Event.enter(function(w)
        {       var a = Reflect.fields(w);
                neko.Lib.println("Enter:"+a.toString());
        }
);





-- 
"It is no measure of health to be well adjusted to a profoundly sick
society." --Jiddu Krishnamurti

-- 
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to