FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

gtkD and Glade - how to start?

 
Post new topic   Reply to topic     Forum Index -> gtkD
View previous topic :: View next topic  
Author Message
thc_flow



Joined: 31 Jan 2011
Posts: 1

PostPosted: Mon Jan 31, 2011 7:17 am    Post subject: gtkD and Glade - how to start? Reply with quote

Hi, i'm new in D language, but i know some others.
I have problem with using Glade in D.
I've found http://gtkd.mikewey.eu/src/glade/Glade.html , but there is no information how to start with that.

My code is very small:

Code:
import glade.Glade;
import gtk.Main;

void main(string[] args)
{
   Glade g;
   g.init();
   g.construct("window.glade",null,null);
}


but, i get errors:
Code:

(process:21364): GLib-GObject-CRITICAL **: gtype.c:2710: You forgot to call g_type_init()

(process:21364): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed

(process:21364): GLib-GObject-CRITICAL **: gtype.c:2710: You forgot to call g_type_init()

(process:21364): GLib-GObject-CRITICAL **: gtype.c:2710: You forgot to call g_type_init()

(process:21364): GLib-GObject-CRITICAL **: gtype.c:2710: You forgot to call g_type_init()

(process:21364): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(process:21364): GLib-GObject-CRITICAL **: gtype.c:2710: You forgot to call g_type_init()

(process:21364): GLib-GObject-CRITICAL **: g_type_interface_add_prerequisite: assertion `G_TYPE_IS_INTERFACE (interface_type)' failed

(process:21364): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed

(process:21364): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(process:21364): GLib-GObject-CRITICAL **: g_type_get_qdata: assertion `node != NULL' failed

(process:21364): GLib-GObject-CRITICAL **: g_type_set_qdata: assertion `node != NULL' failed

(process:21364): GLib-GObject-CRITICAL **: g_type_get_qdata: assertion `node != NULL' failed

(process:21364): GLib-GObject-CRITICAL **: g_type_get_qdata: assertion `node != NULL' failed

(process:21364): GLib-GObject-CRITICAL **: g_type_set_qdata: assertion `node != NULL' failed

(process:21364): GLib-GObject-CRITICAL **: g_type_get_qdata: assertion `node != NULL' failed

(process:21364): GLib-GObject-CRITICAL **: g_type_get_qdata: assertion `node != NULL' failed

(process:21364): GLib-GObject-CRITICAL **: g_type_set_qdata: assertion `node != NULL' failed

(process:21364): GLib-GObject-CRITICAL **: g_type_get_qdata: assertion `node != NULL' failed

(process:21364): GLib-GObject-CRITICAL **: g_type_get_qdata: assertion `node != NULL' failed

(process:21364): GLib-GObject-CRITICAL **: g_type_set_qdata: assertion `node != NULL' failed

(process:21364): GLib-GObject-CRITICAL **: g_type_get_qdata: assertion `node != NULL' failed


How to fix that? How to load glade file and make it working?

Sorry for my bad English Smile
Back to top
View user's profile Send private message
baryluk



Joined: 02 Sep 2007
Posts: 7

PostPosted: Sun Feb 27, 2011 3:15 pm    Post subject: Reply with quote

I'm using just something like this:

Code:

    void main() {
    Main.disableSetlocale();
    Main.initMultiThread(args);   
    auto g2 = new Glade("project.glade");
    Window w = enforce(cast(Window)g2.getWidget("window1"));
    w.setTitle("Project 1");
    w.addOnHide( delegate void(Widget aux){ exit(0); } );
    ...
    ...
    w.showAll();
    Main.run();
    }
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> gtkD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group