cocoa.dialogs: document save-panel stack effect better.
parent
defd931d21
commit
c01267d467
|
@ -14,7 +14,7 @@ HELP: open-panel
|
||||||
{ $description "Displays a file open panel, and outputs a sequence of selected pathnames." } ;
|
{ $description "Displays a file open panel, and outputs a sequence of selected pathnames." } ;
|
||||||
|
|
||||||
HELP: save-panel
|
HELP: save-panel
|
||||||
{ $values { "path" "a pathname string, or " { $link f } } { "paths" "a sequence of pathname strings" } }
|
{ $values { "path" "a pathname string" } { "path/f" { $maybe "a pathname string" } } }
|
||||||
{ $description "Displays a file save panel, and outputs the selected path, or " { $link f } " if the user cancelled the operation." } ;
|
{ $description "Displays a file save panel, and outputs the selected path, or " { $link f } " if the user cancelled the operation." } ;
|
||||||
|
|
||||||
ARTICLE: "cocoa-dialogs" "Cocoa file dialogs"
|
ARTICLE: "cocoa-dialogs" "Cocoa file dialogs"
|
||||||
|
|
|
@ -34,7 +34,7 @@ CONSTANT: NSCancelButton 0
|
||||||
: split-path ( path -- dir file )
|
: split-path ( path -- dir file )
|
||||||
"/" split1-last [ <NSString> ] bi@ ;
|
"/" split1-last [ <NSString> ] bi@ ;
|
||||||
|
|
||||||
: save-panel ( path -- paths )
|
: save-panel ( path -- path/f )
|
||||||
[ <NSSavePanel> dup ] dip
|
[ <NSSavePanel> dup ] dip
|
||||||
split-path -> runModalForDirectory:file: NSOKButton =
|
split-path -> runModalForDirectory:file: NSOKButton =
|
||||||
[ -> filename CF>string ] [ drop f ] if ;
|
[ -> filename CF>string ] [ drop f ] if ;
|
||||||
|
|
Loading…
Reference in New Issue