GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to use the g_file_new_for_path function?

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
sanothay



Joined: 04 May 2008
Posts: 3

PostPosted: Sun May 04, 2008 5:41 pm    Post subject: How to use the g_file_new_for_path function? Reply with quote

Hello all,

Sorry for asking a very basic question, I just did not understand why I got error messages while trying a simple line of code:

GFile *file = NULL;
file = g_file_new_for_path ("/home/my_photos");

Here is the issue, I set the program to stop right before this line:

file = g_file_new_for_path ("/home/my_photos");

and once the program executed the line above ( file = g_file_new_for_path.....) I got these error messages:

(process:3294): GLib-GObject-CRITICAL **: gtype.c:2242: initialization assertion failed, use IA__g_type_init() prior to this function

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

(process:3294): GLib-GObject-CRITICAL **: gtype.c:2242: initialization assertion failed, use IA__g_type_init() prior to this function

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

(process:3294): GLib-GObject-CRITICAL **: gtype.c:2242: initialization assertion failed, use IA__g_type_init() prior to this function

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


Could any one please tell me what cause the problem, or should I follow any specific way to use GFile related funtions?
Thanks a lot,
Soulivanh
Back to top
Micah Carrick
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 427
Location: Portland, OR USA

PostPosted: Mon May 05, 2008 7:33 pm    Post subject: Reply with quote

I don't see what's wrong. Could you post a more complete example so we can test it?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP