# Perl Gtk2::FileChooserDialog



## Shura (Nov 12, 2010)

Hi,

I tried to use G_tk2::FileChooserDialog_ and found it does not work. Even examples.

I get example from here: http://gtk2-perl.sourceforge.net/doc/gtk2-perl-study-guide/c5499.html#AEN5561 and that does not work. No any errors, no any symptoms. Program just freezes, only Ctrl+C helps.

perl v5.10.1
p5-Gtk2-1.221_3

please help.


----------



## SirDice (Nov 12, 2010)

Use the perl debugger to see what's going on.


----------



## Shura (Nov 12, 2010)

Thank you, but I don't understand ho to use it. 
Step by step I go to the following line:

```
my $file_chooser =  Gtk2::FileChooserDialog->new (
                             $heading,
                             $window,
                             $type,
                         );
```
After it debugger does not response on any commands.


----------



## SirDice (Nov 12, 2010)

Ok, then the problem is most likely in the Gtk2::FileChooserDialog module. How did you install that?


----------



## Shura (Nov 12, 2010)

From ports:
`$ cd /usr/ports/x11-toolkits/p5-Gtk2; make install clean`


----------



## SirDice (Nov 12, 2010)

Is $window set correctly?


----------



## Shura (Nov 12, 2010)

Yes, also I tried _unset_, nothing changed.


----------



## SirDice (Nov 12, 2010)

Are you sure it does nothing? As far as I understood it Gtk2::FileChooserDialog can take a long time to present itself.


----------



## Shura (Nov 12, 2010)

He he, I waited for about 40 minutes (I went to dinner) and nothing appeared.

Could you please check this example on your PC?


----------



## Shura (Nov 12, 2010)

I just tried script on Ubuntu, it works.
What wrong with FreeBSD?


----------



## qsecofr (Nov 12, 2010)

```
man perldebtut
man perldebug
perl -d ~your/script.pl
```
A minimum of time spent learning its use can yield much IMO.  Just step right in ..


----------



## Shura (Nov 13, 2010)

Program freezes on string

```
my $file_chooser =  Gtk2::FileChooserDialog->new (
                             $heading,
                             $window,
                             $type,
                         );
```
This command does not return prompt. What can I do?
Please check does p5-Gtk2-1.221_3 work right on your PC. Maybe package is wrong.


----------

