Home > Archive > PerlTk > October 2005 > PerlTk getOpenFile filetypes option
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
PerlTk getOpenFile filetypes option
|
|
|
| Is it posible to have just one filetype in the list?
This works:
$types = [
['HTML Document', '.HTM'],
['All Files', '*', ] ];
This doesn't:
$types = [
['HTML Document', '.HTM']
];
This is the error:
Tk::Error: bad file type "ARRAY(0x1d4e640)", should be "typeName {extension
?ext
ensions ...?} ?{macType ?macTypes ...?}?" at C:/Perl/site/lib/Tk.pm line 325
.
Any Ideas? | |
|
| quote: Originally posted by alw
Is it posible to have just one filetype in the list?
This works:
$types = [
['HTML Document', '.HTM'],
['All Files', '*', ] ];
This doesn't:
$types = [
['HTML Document', '.HTM']
];
This is the error:
Tk::Error: bad file type "ARRAY(0x1d4e640)", should be "typeName {extension
?ext
ensions ...?} ?{macType ?macTypes ...?}?" at C:/Perl/site/lib/Tk.pm line 325
...
Any Ideas?
I'll answer my own question:
use a second empty anonymous array
$types = [
['HTML Document','.HTM'],
[]
]; |
|
|
|
|