Re: [gtk-osx-users] Problem using gtkOSXApplication file open signal with Vala



On 31/01/2012 13:26, Pete Fotheringham wrote:
I have created a vapi file for gtk-mac-integration s, and I have
application code which uses it and they which mostly work. However when
the code to connect the NSApplicationOpenFile signal runs, glib reports
the following
GLib-GObject-WARNING **: gsignal.c:2206: signal
`ns-application-open-file' is invalid for instance `0x1401d020'

The relevant part of the vapi is
/* Signals */
[CCode(cname="NSApplicationOpenFile")]
public signal bool ns_application_open_file(string file_name);

And the calling code is
osxApp.ns_application_open_file.connect(ipc_server.install_from_file);


Solved by calling Signal.connect() (thanks Lethalman)
Signal.connect(osxApp, "NSApplicationOpenFile", (GLib.Callback)(this.open_file_callback), null);



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