Guidance
指路人
g.yi.org
Guidance Forums / Reginald Rexx / GuiFile

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. GuiFile
#13387
Posted by: Phil_Owen 2010-11-05 17:33:46
When running the following simple script: (Stripped out for testing purposes)
/* OPTIONS */

 LIBRARY rexxgui

FN. = ""

error = Guifile('FN','MULTIPLE|EXISTING','My title','All files (*.*) | *.*' )
   if error \= "" then say "Error in Guifile"
say FN.1
Say  FN.0

exit

The variables FN.0 & FN.1 contain nulls after selecting a number of files. But i can see variables FN.131080 etc. being created by GuiFile. This is in the results box but disappears as soon as the function completes - not easy to see. Any idea what I'm doing wrong?

Regards

Phil
Message2.
#13388
Posted by: Phil_Owen 2010-11-06 02:00:24
Further tests show stem tail 131072 holds the total number of entries (instead of .0) and sucessive stems hold the file names. One other quirk to this saga is that if I select more than 18 files from the list GuiFile raises CANCEL even though I pressed the OPEN button. Anyone got any suggestions?
Message3.
#13389
Posted by: PeterJ 2010-11-06 06:48:13
Phil, it seems you are right, I have the same behaviour. The count is hold in 131072, the entries in 131073 , etc.
Even the cancel condition occurs as you described, but not with 18 entries, I think with more than 32 (but I didn't check the exact number).
Message4.
#13396
Posted by: Jeff Glatt 2010-11-07 19:40:10
Try the latest Reginald update.
Message5.
#13397
Posted by: Phil_Owen 2010-11-07 22:27:41
Jeff the latest update fixes the errant tail numbering but the function still returns CANCEL if over 18 files are selected.
Message6.
#13399
Posted by: Jeff Glatt 2010-11-08 04:12:11
I believe the CANCEL behavior is due to a filename size issue. As you select files, their names are all added to the "Name" edit box. Just like any other Edit box, there is a limit to how long this total text may be. If you attempt to exceed the limit, the file dialog's apparent behavior is to do something that causes GuiFile to return a CANCEL. GuiFile's limit is about 256 characters. If you're selecting a lot of files (in one directory), probably the better way to do it is to create your own list of files with a MATCHNAME loop, adding each filename to your own multiple select listbox via GuiSendMsg "ADDSTRING". Or you can use GuiSendMsg "DIR". Consult the "List box" reference page.
Message7.
#13401
Posted by: Phil_Owen 2010-11-08 16:24:33
OK.

Many thanks Jeff. Perhaps the above explanation/caveat could be added to the GuiFile documentation when you have time (I appreciate you're a very busy guy).

Phil Owen.
Message8. Multiple select with large amount of files
#13403
Posted by: PeterJ 2010-11-09 03:32:57
Phil,

maybe you want to try the attached solution. Just check out TestSelectFiles.rex in the attached zip file-
SelectFile 8.11.zip
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
¥1,290.00 ·
 
 
¥918.00 ·
 
 
¥890.00 ·
 
 
¥294.00 ·
 
 
¥430.00 ·
 
 
¥1,380.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0