Re: [gtk-osx-users] when to call gtkosx_application_ready() in an application that initializes in an idle callback

On 15/06/2013, at 12:53 PM, John Ralls wrote:

So my guess is that this delegate isn't registered until gtkosx_application_ready() 
is called. However, checking this by the code I get muddled, as this object is only created 
in static void gtkosx_application_init, which is never called in the file in which it is defined
(gtk-mac-integration-2.0.1/src/gtkosxapplication_quartz.c), as far as I can tell. 

Back to GObject school with you!


GObject uses two-stage construction, just like Python, and for GtkosxApplication, gtkosx_application_init() 
is the second-stage constructor. It's called automatically by the object system after the user program 
calls g_object_new() on GtkosxApplication.

Ah, I see, the reference to gtkosx_application_init() is hidden by G_DEFINE_TYPE. I'm used to the explicit 
formulation. So the delegate should be registered once the GtkosxApplication is instantiated and my guess is 

I can see you're doing things the canonical way, John, and I have no beef with your code, but this sort of 
thing reinforces my opinion that, paraphrasing Dijkstra, 'gobject, "the fatal disease", belongs more to the 
problem set than to the solution set.' 


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