[haXe] exe to neko call

Lee McColl Sylvester lee at designrealm.co.uk
Wed Feb 21 15:24:33 CET 2007


Hi List, Nicolas,

I'm currently creating an exe stub that makes use of a system tray menu 
(thanks to wxWidgets).  Now, I'd like to be able to use the callbacks 
from the menu to call neko functions.  Currently, I've been trying to 
hack a part of the SWHX stub, so it looks like this:

void TaskBar::OnMenuRestore(wxCommandEvent& )
{
    int argc;
    char *argv[] = {""};
    value args[2];
    value mload, exc = NULL;

    mload = neko_default_loader(argv, argc);

    args[0] = alloc_string(DEFAULT_INDEX);
    args[1] = mload;
    val_call0(val_field(mload,val_id("showWindow")));
}


Now, I know this is wrong, because it crashes, but is there any way to 
acquire the current thread's vm instance and call a function using a 
passed string identifier?

Thanks,
Lee





More information about the Haxe mailing list