--- a/EnterBox.st Sat Feb 10 17:57:06 1996 +0100
+++ b/EnterBox.st Sun Feb 11 10:55:05 1996 +0100
@@ -35,6 +35,17 @@
documentation
"
+ Historic note:
+ originally, ST/X had separate classes for the various entry methods;
+ there were YesNoBox, EnterBox, InfoBox and so on.
+ In the meantime, the DialogBox class (and therefore its alias: Dialog)
+ is going to duplicate most funcionality found in these classes.
+
+ In the future, those existing subclasses' functionality is going to
+ be moved fully into Dialog, and the subclasses will be replaced by dummy
+ delegators. (They will be kept for backward compatibility, though).
+
+
this class implements a pop-up box to enter some string
with 2 buttons; a cancel button, and a trigger-action button.
Normally, the box is created and opened with the single message:
@@ -550,5 +561,5 @@
!EnterBox class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/EnterBox.st,v 1.35 1996-01-27 14:15:17 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/EnterBox.st,v 1.36 1996-02-11 09:55:05 cg Exp $'
! !
--- a/EnterBox2.st Sat Feb 10 17:57:06 1996 +0100
+++ b/EnterBox2.st Sun Feb 11 10:55:05 1996 +0100
@@ -11,10 +11,10 @@
"
EnterBox subclass:#EnterBox2
- instanceVariableNames:'okButton2 okAction2'
- classVariableNames:''
- poolDictionaries:''
- category:'Views-DialogBoxes'
+ instanceVariableNames:'okButton2 okAction2'
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Views-DialogBoxes'
!
!EnterBox2 class methodsFor:'instance creation'!
@@ -48,16 +48,28 @@
documentation
"
+ Historic note:
+ originally, ST/X had separate classes for the various entry methods;
+ there were YesNoBox, EnterBox, InfoBox and so on.
+ In the meantime, the DialogBox class (and therefore its alias: Dialog)
+ is going to duplicate most funcionality found in these classes.
+
+ In the future, those existing subclasses' functionality is going to
+ be moved fully into Dialog, and the subclasses will be replaced by dummy
+ delegators. (They will be kept for backward compatibility, though).
+
An EnterBox2 is like an EnterBox but with 2 action buttons.
This is used (for example) in the search-boxes, where two ok-buttons
'find-previous' and 'find-next' are needed in addition to the abort button.
The protocol is like that of EnterBox, the additional buttons label
can be set with 'okText2:aString' and its action with 'action2:aBlock'.
"
+
+ "Modified: 10.2.1996 / 18:00:28 / cg"
!
version
- ^ '$Header: /cvs/stx/stx/libwidg/EnterBox2.st,v 1.13 1995-11-23 02:25:05 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/EnterBox2.st,v 1.14 1996-02-11 09:54:43 cg Exp $'
! !
!EnterBox2 methodsFor:'accessing'!
--- a/InfoBox.st Sat Feb 10 17:57:06 1996 +0100
+++ b/InfoBox.st Sun Feb 11 10:55:05 1996 +0100
@@ -13,10 +13,10 @@
DialogBox subclass:#InfoBox
- instanceVariableNames:'formLabel textLabel'
- classVariableNames:'InfoBitmap'
- poolDictionaries:''
- category:'Views-DialogBoxes'
+ instanceVariableNames:'formLabel textLabel'
+ classVariableNames:'InfoBitmap'
+ poolDictionaries:''
+ category:'Views-DialogBoxes'
!
!InfoBox class methodsFor:'documentation'!
@@ -39,6 +39,18 @@
documentation
"
+ Historic note:
+ originally, ST/X had separate classes for the various entry methods;
+ there were YesNoBox, EnterBox, InfoBox and so on.
+ In the meantime, the DialogBox class (and therefore its alias: Dialog)
+ is going to duplicate most funcionality found in these classes.
+
+ In the future, those existing subclasses' functionality is going to
+ be moved fully into Dialog, and the subclasses will be replaced by dummy
+ delegators. (They will be kept for backward compatibility, though).
+
+
+
this class implements a pop-up box to show an information message.
It has a single ok-Button, which closes the box.
Also entering return has (by default) the same effect as pressing
@@ -49,9 +61,9 @@
instance variables:
- formLabel <Label> shows a bitmap (warning, question-mark)
+ formLabel <Label> shows a bitmap (warning, question-mark)
- textLabel <Label> shows the boxes text
+ textLabel <Label> shows the boxes text
"
@@ -297,5 +309,5 @@
!InfoBox class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/InfoBox.st,v 1.21 1995-12-07 22:23:19 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/InfoBox.st,v 1.22 1996-02-11 09:53:43 cg Exp $'
! !
--- a/OptBox.st Sat Feb 10 17:57:06 1996 +0100
+++ b/OptBox.st Sun Feb 11 10:55:05 1996 +0100
@@ -11,11 +11,11 @@
"
ModalBox subclass:#OptionBox
- instanceVariableNames:'formLabel textLabel buttonPanel buttons actions
- defaultButtonIndex'
- classVariableNames:'WarnBitmap'
- poolDictionaries:''
- category:'Views-DialogBoxes'
+ instanceVariableNames:'formLabel textLabel buttonPanel buttons actions
+ defaultButtonIndex'
+ classVariableNames:'WarnBitmap'
+ poolDictionaries:''
+ category:'Views-DialogBoxes'
!
!OptionBox class methodsFor:'documentation'!
@@ -36,6 +36,18 @@
documentation
"
+ Historic note:
+ originally, ST/X had separate classes for the various entry methods;
+ there were YesNoBox, EnterBox, InfoBox and so on.
+ In the meantime, the DialogBox class (and therefore its alias: Dialog)
+ is going to duplicate most funcionality found in these classes.
+
+ In the future, those existing subclasses' functionality is going to
+ be moved fully into Dialog, and the subclasses will be replaced by dummy
+ delegators. (They will be kept for backward compatibility, though).
+
+
+
OptionBoxes are like YesNoBoxes but with as many buttons as you like;
this will finally be a superclass of WarnBox and YesNoBox - or maybe merged
all into DialogBox..
@@ -45,43 +57,43 @@
examples:
- |box|
+ |box|
- box := OptionBox title:'hello' numberOfOptions:4.
- box showAtPointer
+ box := OptionBox title:'hello' numberOfOptions:4.
+ box showAtPointer
- |box|
- box := OptionBox title:'hello' numberOfOptions:3.
- box buttonTitles:#('one' 'two' 'three').
- box showAtPointer
+ |box|
+ box := OptionBox title:'hello' numberOfOptions:3.
+ box buttonTitles:#('one' 'two' 'three').
+ box showAtPointer
performing an action:
- |box|
- box := OptionBox title:'hello' numberOfOptions:3.
- box buttonTitles:#('one' 'two' 'three').
- box action:[:which | Transcript show:'button ';
- show: which;
- showCr:' was pressed'].
- box showAtPointer
+ |box|
+ box := OptionBox title:'hello' numberOfOptions:3.
+ box buttonTitles:#('one' 'two' 'three').
+ box action:[:which | Transcript show:'button ';
+ show: which;
+ showCr:' was pressed'].
+ box showAtPointer
returning a value:
- |what|
- what := OptionBox
- request:('text has not been accepted.\\Your modifications will be lost when continuing.') withCRs
- label:' Attention'
- form:(WarningBox iconBitmap)
- buttonLabels:#('abort' 'accept' 'continue')
- values:#(#abort #accept #continue).
+ |what|
+ what := OptionBox
+ request:('text has not been accepted.\\Your modifications will be lost when continuing.') withCRs
+ label:' Attention'
+ form:(WarningBox iconBitmap)
+ buttonLabels:#('abort' 'accept' 'continue')
+ values:#(#abort #accept #continue).
- ...
- someObject perform:what.
- ...
+ ...
+ someObject perform:what.
+ ...
CAVEAT: this is a leftover - functionality will be merged into DialogBox
"
@@ -365,5 +377,5 @@
!OptionBox class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/Attic/OptBox.st,v 1.24 1995-12-07 22:23:45 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Attic/OptBox.st,v 1.25 1996-02-11 09:53:59 cg Exp $'
! !
--- a/OptionBox.st Sat Feb 10 17:57:06 1996 +0100
+++ b/OptionBox.st Sun Feb 11 10:55:05 1996 +0100
@@ -11,11 +11,11 @@
"
ModalBox subclass:#OptionBox
- instanceVariableNames:'formLabel textLabel buttonPanel buttons actions
- defaultButtonIndex'
- classVariableNames:'WarnBitmap'
- poolDictionaries:''
- category:'Views-DialogBoxes'
+ instanceVariableNames:'formLabel textLabel buttonPanel buttons actions
+ defaultButtonIndex'
+ classVariableNames:'WarnBitmap'
+ poolDictionaries:''
+ category:'Views-DialogBoxes'
!
!OptionBox class methodsFor:'documentation'!
@@ -36,6 +36,18 @@
documentation
"
+ Historic note:
+ originally, ST/X had separate classes for the various entry methods;
+ there were YesNoBox, EnterBox, InfoBox and so on.
+ In the meantime, the DialogBox class (and therefore its alias: Dialog)
+ is going to duplicate most funcionality found in these classes.
+
+ In the future, those existing subclasses' functionality is going to
+ be moved fully into Dialog, and the subclasses will be replaced by dummy
+ delegators. (They will be kept for backward compatibility, though).
+
+
+
OptionBoxes are like YesNoBoxes but with as many buttons as you like;
this will finally be a superclass of WarnBox and YesNoBox - or maybe merged
all into DialogBox..
@@ -45,43 +57,43 @@
examples:
- |box|
+ |box|
- box := OptionBox title:'hello' numberOfOptions:4.
- box showAtPointer
+ box := OptionBox title:'hello' numberOfOptions:4.
+ box showAtPointer
- |box|
- box := OptionBox title:'hello' numberOfOptions:3.
- box buttonTitles:#('one' 'two' 'three').
- box showAtPointer
+ |box|
+ box := OptionBox title:'hello' numberOfOptions:3.
+ box buttonTitles:#('one' 'two' 'three').
+ box showAtPointer
performing an action:
- |box|
- box := OptionBox title:'hello' numberOfOptions:3.
- box buttonTitles:#('one' 'two' 'three').
- box action:[:which | Transcript show:'button ';
- show: which;
- showCr:' was pressed'].
- box showAtPointer
+ |box|
+ box := OptionBox title:'hello' numberOfOptions:3.
+ box buttonTitles:#('one' 'two' 'three').
+ box action:[:which | Transcript show:'button ';
+ show: which;
+ showCr:' was pressed'].
+ box showAtPointer
returning a value:
- |what|
- what := OptionBox
- request:('text has not been accepted.\\Your modifications will be lost when continuing.') withCRs
- label:' Attention'
- form:(WarningBox iconBitmap)
- buttonLabels:#('abort' 'accept' 'continue')
- values:#(#abort #accept #continue).
+ |what|
+ what := OptionBox
+ request:('text has not been accepted.\\Your modifications will be lost when continuing.') withCRs
+ label:' Attention'
+ form:(WarningBox iconBitmap)
+ buttonLabels:#('abort' 'accept' 'continue')
+ values:#(#abort #accept #continue).
- ...
- someObject perform:what.
- ...
+ ...
+ someObject perform:what.
+ ...
CAVEAT: this is a leftover - functionality will be merged into DialogBox
"
@@ -365,5 +377,5 @@
!OptionBox class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/OptionBox.st,v 1.24 1995-12-07 22:23:45 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/OptionBox.st,v 1.25 1996-02-11 09:53:59 cg Exp $'
! !
--- a/WarnBox.st Sat Feb 10 17:57:06 1996 +0100
+++ b/WarnBox.st Sun Feb 11 10:55:05 1996 +0100
@@ -11,10 +11,10 @@
"
InfoBox subclass:#WarningBox
- instanceVariableNames:''
- classVariableNames:'WarnBitmap'
- poolDictionaries:''
- category:'Views-DialogBoxes'
+ instanceVariableNames:''
+ classVariableNames:'WarnBitmap'
+ poolDictionaries:''
+ category:'Views-DialogBoxes'
!
!WarningBox class methodsFor:'documentation'!
@@ -35,26 +35,38 @@
documentation
"
+ Historic note:
+ originally, ST/X had separate classes for the various entry methods;
+ there were YesNoBox, EnterBox, InfoBox and so on.
+ In the meantime, the DialogBox class (and therefore its alias: Dialog)
+ is going to duplicate most funcionality found in these classes.
+
+ In the future, those existing subclasses' functionality is going to
+ be moved fully into Dialog, and the subclasses will be replaced by dummy
+ delegators. (They will be kept for backward compatibility, though).
+
+
+
this class implements a pop-up box to show an information message.
WarningBoxes are basically InfoBoxes with a different bitmap-image.
(also, they add a beep when popping up)
They are created with:
- aBox := WarningBox title:'some title'.
+ aBox := WarningBox title:'some title'.
and shown with:
- aBox showAtPointer
+ aBox showAtPointer
The default box shows 'yes' in its button; this can be changed with:
- aBox okText:'some string'.
+ aBox okText:'some string'.
Since showing warnings is a common action, a convenient method has been
added to Object; thus you can use:
- self warn:'oops - headcrash'
+ self warn:'oops - headcrash'
everywhere in your code.
"
@@ -152,5 +164,5 @@
!WarningBox class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/Attic/WarnBox.st,v 1.13 1995-12-07 22:23:57 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Attic/WarnBox.st,v 1.14 1996-02-11 09:54:12 cg Exp $'
! !
--- a/WarningBox.st Sat Feb 10 17:57:06 1996 +0100
+++ b/WarningBox.st Sun Feb 11 10:55:05 1996 +0100
@@ -11,10 +11,10 @@
"
InfoBox subclass:#WarningBox
- instanceVariableNames:''
- classVariableNames:'WarnBitmap'
- poolDictionaries:''
- category:'Views-DialogBoxes'
+ instanceVariableNames:''
+ classVariableNames:'WarnBitmap'
+ poolDictionaries:''
+ category:'Views-DialogBoxes'
!
!WarningBox class methodsFor:'documentation'!
@@ -35,26 +35,38 @@
documentation
"
+ Historic note:
+ originally, ST/X had separate classes for the various entry methods;
+ there were YesNoBox, EnterBox, InfoBox and so on.
+ In the meantime, the DialogBox class (and therefore its alias: Dialog)
+ is going to duplicate most funcionality found in these classes.
+
+ In the future, those existing subclasses' functionality is going to
+ be moved fully into Dialog, and the subclasses will be replaced by dummy
+ delegators. (They will be kept for backward compatibility, though).
+
+
+
this class implements a pop-up box to show an information message.
WarningBoxes are basically InfoBoxes with a different bitmap-image.
(also, they add a beep when popping up)
They are created with:
- aBox := WarningBox title:'some title'.
+ aBox := WarningBox title:'some title'.
and shown with:
- aBox showAtPointer
+ aBox showAtPointer
The default box shows 'yes' in its button; this can be changed with:
- aBox okText:'some string'.
+ aBox okText:'some string'.
Since showing warnings is a common action, a convenient method has been
added to Object; thus you can use:
- self warn:'oops - headcrash'
+ self warn:'oops - headcrash'
everywhere in your code.
"
@@ -152,5 +164,5 @@
!WarningBox class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/WarningBox.st,v 1.13 1995-12-07 22:23:57 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/WarningBox.st,v 1.14 1996-02-11 09:54:12 cg Exp $'
! !
--- a/YesNoBox.st Sat Feb 10 17:57:06 1996 +0100
+++ b/YesNoBox.st Sun Feb 11 10:55:05 1996 +0100
@@ -35,20 +35,32 @@
documentation
"
+ Historic note:
+ originally, ST/X had separate classes for the various entry methods;
+ there were YesNoBox, EnterBox, InfoBox and so on.
+ In the meantime, the DialogBox class (and therefore its alias: Dialog)
+ is going to duplicate most funcionality found in these classes.
+
+ In the future, those existing subclasses' functionality is going to
+ be moved fully into Dialog, and the subclasses will be replaced by dummy
+ delegators. (They will be kept for backward compatibility, though).
+
+
+
this class implements yes-no boxes by adding another (no-) Button to the WarnBox-View.
They are created with:
- aBox := YesNoBox title:'some title'.
- aBox okAction:[ .. some action to be performed when ok is pressed ].
+ aBox := YesNoBox title:'some title'.
+ aBox okAction:[ .. some action to be performed when ok is pressed ].
and finally shown with:
- aBox showAtPointer
+ aBox showAtPointer
The default box shows 'yes' and 'no' in its buttons; this can be changed with:
- aBox yesText:'some string'.
- aBox noText:'some string'.
+ aBox yesText:'some string'.
+ aBox noText:'some string'.
There is also protocol to set both button titles in one message.
Also, the action associated to the noButton can be changed.
@@ -57,11 +69,11 @@
Since implemented in Object, everyone understands confirm. You can pass
a question message (but not change the buttons labels).
Use is:
- self confirm:'some question'
+ self confirm:'some question'
and will return true or false.
For compatibility with ST-80, use:
- Dialog confirm:'hello'
+ Dialog confirm:'hello'
"
!
@@ -348,5 +360,5 @@
!YesNoBox class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/YesNoBox.st,v 1.22 1995-12-13 16:30:35 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/YesNoBox.st,v 1.23 1996-02-11 09:54:26 cg Exp $'
! !