| View previous topic :: View next topic |
| Author |
Message |
shivaspace
Joined: 19 Jul 2006 Posts: 8
|
Posted: Wed Jul 19, 2006 12:33 pm Post subject: gtkfilechooserwidget's mutiple selection |
|
|
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
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
|
Posted: Wed Jul 19, 2006 2:16 pm Post subject: |
|
|
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
|
Posted: Wed Jul 19, 2006 2:47 pm Post subject: |
|
|
I thought it was the last, now I doubt it
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
edit: I do use it for file selection only |
|
| Back to top |
|
 |
shivaspace
Joined: 19 Jul 2006 Posts: 8
|
Posted: Wed Jul 19, 2006 3:11 pm Post subject: |
|
|
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
|
Posted: Wed Jul 19, 2006 5:58 pm Post subject: |
|
|
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
|
Posted: Wed Jul 19, 2006 6:32 pm Post subject: |
|
|
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
Thanks a lot for your help guys, I'll try again |
|
| Back to top |
|
 |
|