Re: dialog_pickfile internal buffer [message #39241] |
Mon, 03 May 2004 14:50 |
Peter Mason
Messages: 145 Registered: June 1996
|
Senior Member |
|
|
Ben Tupper wrote:
> David Chevrier wrote:
>> Hi guys,
>> Quick question. I'm entering a large number of 512x512 tiff images
>> of ct scanned fish into a widget based gui I wrote for polygon
>> extraction of their air bladder(s). However, I have found a little
>> problem. My pro crashes out on this line:
>> filesToUse = DIALOG_PICKFILE(FILTER='*.tif', TITLE='Pick the TIF
>> files', /MULTIPLE_FILES)
>> with the message "DIALOG_PICKFILE: Dialog failure - Internal buffer
>> of 32767 bytes exceeded."
>>
>> This only happens when I try to pick more than 627 images at once.
>> (I know its a lot.) I have been able to make a few work-arounds,
>> but I was curious if anyone knew how to change the internal buffer
>> (if at all possible).
>>
>
> Hello,
>
> I don't know what the error means, but you might consider having the
> user select a directory (see the DIRECTORY keyword for
> DIALOG_PICKFILE) instead of selecting multiple files.
>
> Ben
I second Ben's advice.
David, if you're using Unix then ignore the rest of my post, but...
If you're using Windows then I believe that the limitation is due to Win32
rather than IDL. DIALOG_PICKFILE uses the native Win32 "GetOpenFileName"
dialog and that's where the problem is. I've run into it myself in a
straight C program. It is somewhat surprising to still find silent 16-bit
carry-overs like this, but there you go.
Now you could go and write your *own* file-selection dialog in IDL (or maybe
there's already a suitable one out there) but from a practical standpoint -
if hundreds of files are involved - it would probably be easier for the user
to just select a directory and for your app to filter out the files it
wants, IMHO.
To the best of my knowledge, you won't hit a limit with IDL's FINDFILE
function. (If in fact you do, you could spawn a dir command instead.)
|
|
|
Re: dialog_pickfile internal buffer [message #39243 is a reply to message #39241] |
Mon, 03 May 2004 09:50  |
btt
Messages: 345 Registered: December 2000
|
Senior Member |
|
|
David Chevrier wrote:
> Hi guys,
> Quick question. I'm entering a large number of 512x512 tiff images
> of ct scanned fish into a widget based gui I wrote for polygon
> extraction of their air bladder(s). However, I have found a little
> problem. My pro crashes out on this line:
> filesToUse = DIALOG_PICKFILE(FILTER='*.tif', TITLE='Pick the TIF
> files', /MULTIPLE_FILES)
> with the message "DIALOG_PICKFILE: Dialog failure - Internal buffer of
> 32767 bytes exceeded."
>
> This only happens when I try to pick more than 627 images at once. (I
> know its a lot.) I have been able to make a few work-arounds, but I
> was curious if anyone knew how to change the internal buffer (if at
> all possible).
>
Hello,
I don't know what the error means, but you might consider having the
user select a directory (see the DIRECTORY keyword for DIALOG_PICKFILE)
instead of selecting multiple files.
Ben
|
|
|