[haXe] exe to neko call

Nicolas Cannasse ncannasse at motion-twin.com
Wed Feb 21 17:06:25 CET 2007


> Sorry, theres a lot of crap in there.  Try
> 
> void TaskBar::OnMenuRestore(wxCommandEvent& )
> {
>    value mload = neko_default_loader(NULL, 0);
>    val_call0(val_field(mload,val_id("hideWindow")));
> }

neko_default_loader allocate a new loader which does not have a 
hideWindow method. And it's not easy to retreive the current loader 
(since you are outside of a Neko module it would not make sense).

Try setting a callback first, store it into a alloc_root(1) block, and 
use it :

static value *hwindow = NULL;

value set_hide_window( value v ) {
     val_check_function(v,0);
     if( hwindow == NULL ) hwindow = alloc_root(1);
     *hwindow = v;
     return val_null;
}

...

if( hwindow != NULL )
     val_call0(*hwindow);

Nicolas



More information about the Haxe mailing list