--- a/DialogBox.st Thu Mar 07 11:38:39 2002 +0100
+++ b/DialogBox.st Fri Mar 08 15:30:06 2002 +0100
@@ -1944,6 +1944,41 @@
"Modified: 21.2.1997 / 11:18:40 / cg"
!
+requestFileName:titleString default:defaultName pattern:pattern fromDirectory:aDirectory
+ "launch a Dialog, which allows user to enter a filename.
+ The files presented initially are those from the current directory.
+ The box will show ok/cancel in its buttons.
+ The matchPattern is set to pattern initially.
+ Return the string or nil if cancel was pressed."
+
+ |resources|
+
+ resources := self classResources.
+ ^ self
+ requestFileName:titleString
+ default:defaultName
+ ok:(resources string:'Ok')
+ abort:(resources string:'Cancel')
+ pattern:pattern
+ fromDirectory:aDirectory
+
+ "
+ Dialog
+ requestFileName:'enter a fileName:'
+ default:''
+ pattern:'*.st'
+ "
+ "
+ Dialog
+ requestFileName:'enter a fileName:'
+ default:''
+ pattern:'*.st;*.h'
+ "
+
+ "Created: 21.2.1997 / 11:16:52 / cg"
+ "Modified: 21.2.1997 / 11:18:40 / cg"
+!
+
requestFileName:titleString default:defaultName version:versionSymbol
"launch a Dialog, which allows user to enter a filename.
The box will not allow pressing 'ok' without an entered string.
@@ -2230,6 +2265,30 @@
"
!
+requestFileName:titleString pattern:pattern fromDirectory:aDirectory
+ "launch a Dialog, which allows user to enter a filename.
+ The files presented initially are those from the current directory.
+ The box will show ok/cancel in its buttons.
+ The matchPattern is set to pattern initially.
+ Return the string or nil if cancel was pressed."
+
+ ^ self
+ requestFileName:titleString
+ default:nil
+ pattern:pattern
+ fromDirectory:aDirectory
+ "
+ Dialog
+ requestFileName:'enter a fileName:'
+ pattern:'*.st'
+ "
+ "
+ Dialog
+ requestFileName:'enter a fileName:'
+ pattern:'*.st;*.h'
+ "
+!
+
requestNewFileName:titleString default:defaultName
"launch a Dialog, which allows user to enter a filename.
We expect a new files (i.e. nonexisting) name to be enterred,
@@ -7417,6 +7476,6 @@
!DialogBox class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.187 2002-03-07 10:38:39 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.188 2002-03-08 14:30:06 penk Exp $'
! !
DialogBox initialize!