gnope php gtk gui gnope.org  

gtkfilechooserwidget's mutiple selection

 
Post new topic   Reply to topic    gnope.org Forum Index -> PHP GTK2 Beginners
View previous topic :: View next topic  
Author Message
shivaspace



Joined: 19 Jul 2006
Posts: 8

PostPosted: Wed Jul 19, 2006 12:33 pm    Post subject: gtkfilechooserwidget's mutiple selection Reply with quote

Hi all!
First things first, thanks a lot for this forum, it's been of great help to me.

I'm having trouble using the GtkFileChooserWidget, I can't obtain the list of files I select in multiple file selection mode (using the set_selection_multiple method).
In Gtk+ this class has two methods: get_filename (single file selection) and get_filenames (multiple file selection) but in php it seems like there's only the get_filename() method, and I can't find a way to obtain the list of files I select in multiple file selection mode.
Any ideas are welcome Smile
TIA

btw: I can only use this one class as it's the only file selector that can be embedded in a gtkwindow
Back to top
scott



Joined: 16 Feb 2006
Posts: 35

PostPosted: Wed Jul 19, 2006 2:16 pm    Post subject: Reply with quote

Hello,

The method exists for me. Are you using the latest version of PHP-GTK 2? Also, are you using the right file chooser action? You can not have multiple seelctions if you are trying to save a file or create a folder (regardless of what the Gtk+ docs say).

Scott
Back to top
shivaspace



Joined: 19 Jul 2006
Posts: 8

PostPosted: Wed Jul 19, 2006 2:47 pm    Post subject: Reply with quote

I thought it was the last, now I doubt it Very Happy
I'm gonna change it right away and test it, but if that was the case, shouldn't the method (get_filenames) be in the gtk-php doc?
Cause if I refer to the doc (http://gtk.php.net/manual/en/gtk.gtkfilechooserwidget.php) it's not even mentioned as an available method for this class Shocked

edit: I do use it for file selection only
Back to top
shivaspace



Joined: 19 Jul 2006
Posts: 8

PostPosted: Wed Jul 19, 2006 3:11 pm    Post subject: Reply with quote

It still doesn't work for me, even with the latest php-gtk version, I get this error: "Call to undefined method GtkFileChooserWidget::get_filenames() in file.php on line X"

Also I found this link, http://aspn.activestate.com/ASPN/Mail/Message/php-gtk-dev/3055797
looks like it may solve my problem but I don't understand the whole part between "%%" characters, would any1 have any idea what it is?[/img]
Back to top
cweiske



Joined: 08 Dec 2005
Posts: 454
Location: Leipzig/Germany

PostPosted: Wed Jul 19, 2006 5:58 pm    Post subject: Reply with quote

Does Dev_Inspector show the method? It does it for me.

Second, the docs are not complete, they are even far from it. The basic skeleton has been generated from php-gtk2 two years ago, and lots of new methods have been added since then, while others have been moved to different classes. The php-gtk-doc team (which is, scott and me) is working on making the docs better.
You can see the current status at http://php-gtk2.de/manual/coverage.html

But since there are still more than 2000 (!) methods to document, it will take a bigger while unless some people will join the doc team and help us.
Back to top
shivaspace



Joined: 19 Jul 2006
Posts: 8

PostPosted: Wed Jul 19, 2006 6:32 pm    Post subject: Reply with quote

No, devinspector doesn't display it, it only shows the get_filename() method...
I guess I'm gonna uninstall everything relevant to php and gtk and start all over, I just saw that the latest version of gtk that I installed needs php 5.2, I know I have php5 but have no idea about the .2
I know the documentation is in progress (its great btw) but since the method was missing in the doc and in my code I really thought it was omitted in the whole gtk thing Very Happy

Thanks a lot for your help guys, I'll try again
Back to top
Display posts from previous:   
Post new topic   Reply to topic    gnope.org Forum Index -> PHP GTK2 Beginners 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
Templates enhanced by DigiWiki. Hosting by Tradebit.