LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-11-2005, 09:13 PM   #1
animehair
Member
 
Registered: Sep 2004
Location: NJ
Distribution: Gentoo
Posts: 104

Rep: Reputation: 15
GTK Getting Filename From A File Selection Button HELP


Im building a GTK application with glade and I need help grabbing a filename (and path) from a file selection button to print out unto the terminal window when a button is pushed. I am learning all this stuff as I go. Any help will be appreciated i am getting the following error:

Code:
Gtk-CRITICAL **: gtk_file_selection_get_filename: assertion `GTK_IS_FILE_SELECTION (filesel)' failed
 
Old 02-13-2006, 10:58 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Whatever "filesel" is, it doesn't look like you've created it to be a "GtkFileSelection" widget (ie. some "GtkWidget *" created with a call to gtk_file_selection_new()).

Please compare your code with the sample code here:

http://developer.gimp.org/api/2.0/gt...Selection.html

If you're not using the code generator (i.e. if you don't have any non-glade GTK+ code to look at), then it might be a glade problem. In that case, you might want to consider just doing the GtkFileSelection manually (instead of via glade). It's easy (as the example code in the reference above shows).

Good luck .. PSM

Last edited by paulsm4; 02-13-2006 at 10:59 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Gtk Button Events sausagejohnson Programming 0 05-26-2005 08:04 PM
adding date to filename (creating a quick screenshot button) toaster.waffle Linux - Software 2 04-27-2005 03:19 AM
I miss my lovely GTK+ file selection melinda_sayang Slackware 0 07-12-2004 10:55 PM
GTK tree view/model/selection question elluva Programming 8 05-22-2004 12:19 PM
How to get Source code of Gtk File Selection Widget chaits Linux - General 0 04-14-2004 09:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration