Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

File Save Dialog?

 [1/9] from: bpaddock:csonline at: 6-Dec-2001 10:24


Is there a standard, or at least common View Dialog that lets you specify the name of a file with a path? I didn't see one in the library, closest was text-edit.r. I want to have people enter the path of where they want to save the file, and validate that the path they entered is valid. The file may or may not exist at this point in time (it is saving patent pages, on the first run the file will not exist, on a restart the file will exist).

 [2/9] from: greggirwin::mindspring::com at: 6-Dec-2001 10:06


Hi Bob, << Is there a standard, or at least common View Dialog that lets you specify the name of a file with a path? I didn't see one in the library, closest was text-edit.r. >> Have you tried request-file? --Gregg

 [3/9] from: bpaddock:csonline at: 6-Dec-2001 12:12


>I didn't see one in the library, closest was text-edit.r. >> > >Have you tried request-file?
There is no "request-file' in the library.rip I was using as my library. The Rebol Desk Top is not coming up for me to day to look in that library, don't know why. Can you give me a direct URL to it please?

 [4/9] from: al:bri:xtra at: 7-Dec-2001 6:28


> >Have you tried request-file? > > There is no "request-file' in the library.rip I was using as my library. > > The Rebol Desk Top is not coming up for me to day to look in that library, > don't know why. Can you give me a direct URL to it please? >> help request-file
USAGE: REQUEST-FILE /title title-line button-text /file name /filter filt /keep /only /path DESCRIPTION: Requests a file using a popup list of files and directories. REQUEST-FILE is a function value. REFINEMENTS: /title -- Change heading on request. title-line -- Title line of request (Type: any) button-text -- Button text for selection (Type: any) /file name -- Default file name or block of file names (Type: any) /filter filt -- Filter or block of filters (Type: any) /keep -- Keep previous settings and results /only -- Return only a single file, not a block. /path -- Return absolute path followed by relative files. It's in Rebol/View as a standard function. Andrew Martin ICQ: 26227169 http://valley.150m.com/

 [5/9] from: bpaddock:csonline at: 6-Dec-2001 13:37


>>> help request-file >It's in Rebol/View as a standard function.
No wonder I could not find it, would never to think to look *there* . :-( Can you point me to a sample that uses it? Thank you.

 [6/9] from: jasonic:panix at: 6-Dec-2001 15:33


> >>> help request-file > >It's in Rebol/View as a standard function. > > No wonder I could not find it, would never to think to look *there* . :-( > > Can you point me to a sample that uses it?
Try this at the console, and then in any script:
>> file: request-file
== [%/C/rebol/view/bay.jpg] ;or whatever the refinements are useful
>> file: request-file/keep/filter ".png"
== [%/C/rebol/view/buddha.png] With /keep the next time you call it, the same file will be already highlighted. Nice. I don't know how to make the /title option work. Can anyone show me an example please? One gripe/wish I have is that REBOL/View does not allow/include default double-clicking options on file names or buttons. Anyone know how to do this for request-file? While you are at it, check out the default REBOL/View request-color too. Some inmproved version are around too.. ./Jason

 [7/9] from: greggirwin:mindspring at: 6-Dec-2001 14:12


Hi Jason, << I don't know how to make the /title option work. Can anyone show me an example please? >> f: request-file/title/filter "Save Image" "Save" ["*.png"] Note that it isn't the title bar that gets the title, but header label at the top of the layout. --Gregg

 [8/9] from: jasonic:panix at: 6-Dec-2001 16:31


> << I don't know how to make the /title option work. > Can anyone show me an example please? >> > > f: request-file/title/filter "Save Image" "Save" ["*.png"] > > Note that it isn't the title bar that gets the title, but header label at > the top of the layout.
aha.. Thanks Gregg :-) Q2: Do you know how to modify the other button text and actions as well? ./Jason

 [9/9] from: greggirwin:mindspring at: 6-Dec-2001 22:02


Hi Jason, << Q2: Do you know how to modify the other button text and actions as well?
>>
Nope. --Gregg