WarningBox.st
author Claus Gittinger <cg@exept.de>
Thu, 15 Nov 2001 22:03:22 +0100
changeset 2468 abb90d63faf2
parent 2362 f6ace7307e4d
child 2469 da097548025a
permissions -rw-r--r--
documentation
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     1
"
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     2
 COPYRIGHT (c) 1993 by Claus Gittinger
59
450ce95a72a4 *** empty log message ***
claus
parents: 38
diff changeset
     3
	      All Rights Reserved
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     4
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    11
"
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    12
2362
f6ace7307e4d examples fixed (bitmaps access)
Claus Gittinger <cg@exept.de>
parents: 2073
diff changeset
    13
"{ Package: 'stx:libwidg' }"
f6ace7307e4d examples fixed (bitmaps access)
Claus Gittinger <cg@exept.de>
parents: 2073
diff changeset
    14
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    15
InfoBox subclass:#WarningBox
355
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    16
	instanceVariableNames:''
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    17
	classVariableNames:'WarnBitmap'
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    18
	poolDictionaries:''
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    19
	category:'Views-DialogBoxes'
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    20
!
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    21
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    22
!WarningBox class methodsFor:'documentation'!
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    23
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    24
copyright
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    25
"
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    26
 COPYRIGHT (c) 1993 by Claus Gittinger
59
450ce95a72a4 *** empty log message ***
claus
parents: 38
diff changeset
    27
	      All Rights Reserved
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    28
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    29
 This software is furnished under a license and may be used
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    30
 only in accordance with the terms of that license and with the
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    32
 be provided or otherwise made available to, or used by, any
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    33
 other person.  No title to or ownership of the software is
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    34
 hereby transferred.
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    35
"
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    36
!
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    37
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    38
documentation
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    39
"
355
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    40
   Historic note:
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    41
        originally, ST/X had separate classes for the various entry methods;
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    42
        there were YesNoBox, EnterBox, InfoBox and so on.
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    43
        In the meantime, the DialogBox class (and therefore its alias: Dialog)
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    44
        is going to duplicate most funcionality found in these classes.
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    45
2468
abb90d63faf2 documentation
Claus Gittinger <cg@exept.de>
parents: 2362
diff changeset
    46
        In the future, those existing subclasses' functionality might
abb90d63faf2 documentation
Claus Gittinger <cg@exept.de>
parents: 2362
diff changeset
    47
        be moved fully into Dialog, and the subclasses be replaced by dummy
355
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    48
        delegators. (They will be kept for backward compatibility, though).
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    49
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    50
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    51
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    52
    this class implements a pop-up box to show an information message. 
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    53
    WarningBoxes are basically InfoBoxes with a different bitmap-image.
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    54
    (also, they add a beep when popping up)
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    55
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    56
    They are created with:
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    57
355
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    58
        aBox := WarningBox title:'some title'.
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    59
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    60
    and shown with:
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    61
355
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    62
        aBox showAtPointer
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    63
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    64
    The default box shows 'yes' in its button; this can be changed with:
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    65
355
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    66
        aBox okText:'some string'.
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    67
79
6d917a89f7b7 *** empty log message ***
claus
parents: 63
diff changeset
    68
    Since showing warnings is a common action, a convenient method has been
6d917a89f7b7 *** empty log message ***
claus
parents: 63
diff changeset
    69
    added to Object; thus you can use:
6d917a89f7b7 *** empty log message ***
claus
parents: 63
diff changeset
    70
355
a55f62047156 commentary
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    71
        self warn:'oops - headcrash'
79
6d917a89f7b7 *** empty log message ***
claus
parents: 63
diff changeset
    72
6d917a89f7b7 *** empty log message ***
claus
parents: 63
diff changeset
    73
    everywhere in your code.
585
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
    74
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
    75
    [see also:]
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
    76
        DialogBox InfoBox YesNoBox
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
    77
        ( introduction to view programming :html: programming/viewintro.html )
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
    78
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
    79
    [author:]
8f395aba0173 documentation
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
    80
        Claus Gittinger
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
    81
"
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
    82
!
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
    83
63
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
    84
examples
f4eaf04d1eaf *** empty log message ***
claus
parents: 59
diff changeset
    85
"
2468
abb90d63faf2 documentation
Claus Gittinger <cg@exept.de>
parents: 2362
diff changeset
    86
    Notice, the preferred use is via the DialogBox class messages,
abb90d63faf2 documentation
Claus Gittinger <cg@exept.de>
parents: 2362
diff changeset
    87
    such as 
abb90d63faf2 documentation
Claus Gittinger <cg@exept.de>
parents: 2362
diff changeset
    88
                                                                        [exBegin]
abb90d63faf2 documentation
Claus Gittinger <cg@exept.de>
parents: 2362
diff changeset
    89
        Dialog warn:'Coffee or tee ?'
abb90d63faf2 documentation
Claus Gittinger <cg@exept.de>
parents: 2362
diff changeset
    90
                                                                        [exEnd]
abb90d63faf2 documentation
Claus Gittinger <cg@exept.de>
parents: 2362
diff changeset
    91
    these (DialogBox) mesages are compatible with VW and should therefore
abb90d63faf2 documentation
Claus Gittinger <cg@exept.de>
parents: 2362
diff changeset
    92
    be used for portability.
abb90d63faf2 documentation
Claus Gittinger <cg@exept.de>
parents: 2362
diff changeset
    93
abb90d63faf2 documentation
Claus Gittinger <cg@exept.de>
parents: 2362
diff changeset
    94
    Direct reference to WarnBox is only required for highly specialized boxes.
abb90d63faf2 documentation
Claus Gittinger <cg@exept.de>
parents: 2362
diff changeset
    95
abb90d63faf2 documentation
Claus Gittinger <cg@exept.de>
parents: 2362
diff changeset
    96
644
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    97
    standard warning dialogs
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    98
    (recommended, since these are ST-80 compatible interfaces)
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
    99
                                                                        [exBegin]
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   100
        Dialog warn:'you should not do this'
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   101
                                                                        [exEnd]
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   102
    since all objects support the #warn message,
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   103
    you can also simply use (for any self):
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   104
                                                                        [exBegin]
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   105
        self warn:'you should not do this' 
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   106
                                                                        [exEnd]
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   107
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   108
    with attributed text:
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   109
                                                                        [exBegin]
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   110
        Dialog warn:(Text string:'you should not do this' 
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   111
                          emphasis:#color->Color red)
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   112
                                                                        [exEnd]
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   113
        
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   114
    specifying more details of the warnBox (low level entries).
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   115
    label of OK-button:
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   116
                                                                        [exBegin]
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   117
        |aBox|
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
   118
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   119
        aBox := WarningBox title:'Press ''OK'' to continue'.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   120
        aBox okText:'OK'.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   121
        aBox showAtPointer.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   122
                                                                        [exEnd]
644
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   123
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   124
    accessing the ok-Button component and changing its color:
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   125
                                                                        [exBegin]
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   126
        |aBox|
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   127
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   128
        aBox := WarningBox title:'Do you really want to do this ?'.
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   129
        aBox okText:'yes, go on'.
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   130
        aBox okButton foregroundColor:Color red.
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   131
        aBox showAtPointer.
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   132
                                                                        [exEnd]
79
6d917a89f7b7 *** empty log message ***
claus
parents: 63
diff changeset
   133
    since warnboxes are much like infoBoxes, all of look can be changed
6d917a89f7b7 *** empty log message ***
claus
parents: 63
diff changeset
   134
    like described there:
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   135
                                                                        [exBegin]
644
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   136
        |image aBox|
79
6d917a89f7b7 *** empty log message ***
claus
parents: 63
diff changeset
   137
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   138
        aBox := WarningBox title:'Press ''OK'' to continue'.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   139
        aBox okText:'yes, continue'.
2362
f6ace7307e4d examples fixed (bitmaps access)
Claus Gittinger <cg@exept.de>
parents: 2073
diff changeset
   140
        image := Image fromFile:'bitmaps/SmalltalkX.xbm' inPackage:'stx:libtool'.
644
dbb02e0858fa examples
Claus Gittinger <cg@exept.de>
parents: 593
diff changeset
   141
        aBox form:image.
593
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   142
        aBox showAtPointer.
86dd024ed773 examples
Claus Gittinger <cg@exept.de>
parents: 585
diff changeset
   143
                                                                        [exEnd]
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 26
diff changeset
   144
"
59
450ce95a72a4 *** empty log message ***
claus
parents: 38
diff changeset
   145
! !
450ce95a72a4 *** empty log message ***
claus
parents: 38
diff changeset
   146
450ce95a72a4 *** empty log message ***
claus
parents: 38
diff changeset
   147
!WarningBox class methodsFor:'icon bitmap'!
450ce95a72a4 *** empty log message ***
claus
parents: 38
diff changeset
   148
450ce95a72a4 *** empty log message ***
claus
parents: 38
diff changeset
   149
iconBitmap
184
cbc75a3ba885 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   150
    "return the bitmap shown as icon in my instances.
cbc75a3ba885 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   151
     This is the default image; you can overwrite this in a concrete
cbc75a3ba885 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   152
     instance with the image: message"
59
450ce95a72a4 *** empty log message ***
claus
parents: 38
diff changeset
   153
1365
aa6a855b5013 new resource naming
Claus Gittinger <cg@exept.de>
parents: 1173
diff changeset
   154
    <resource: #style (#'warningBox.icon' #'warningBox.iconFile')>
1173
86440dfaca06 allow either image or imageFileName to be specified
Claus Gittinger <cg@exept.de>
parents: 693
diff changeset
   155
86440dfaca06 allow either image or imageFileName to be specified
Claus Gittinger <cg@exept.de>
parents: 693
diff changeset
   156
    |img imgFileName|
86440dfaca06 allow either image or imageFileName to be specified
Claus Gittinger <cg@exept.de>
parents: 693
diff changeset
   157
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   158
    WarnBitmap isNil ifTrue:[
1365
aa6a855b5013 new resource naming
Claus Gittinger <cg@exept.de>
parents: 1173
diff changeset
   159
        img := StyleSheet at:'warningBox.icon'.
1743
8178ee2dd5ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1365
diff changeset
   160
        img isNil ifTrue:[
1365
aa6a855b5013 new resource naming
Claus Gittinger <cg@exept.de>
parents: 1173
diff changeset
   161
            imgFileName := StyleSheet at:'warningBox.iconFile' default:'bitmaps/Warning.xbm'.
2073
40873b6d96bb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
   162
            img := Smalltalk imageFromFileNamed:imgFileName forClass:self.
1173
86440dfaca06 allow either image or imageFileName to be specified
Claus Gittinger <cg@exept.de>
parents: 693
diff changeset
   163
        ].
1743
8178ee2dd5ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1365
diff changeset
   164
        img notNil ifTrue:[
1987
599825bed176 #on: -> #onDevice:
Claus Gittinger <cg@exept.de>
parents: 1915
diff changeset
   165
            img := img onDevice:Display
1743
8178ee2dd5ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1365
diff changeset
   166
        ].
8178ee2dd5ec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1365
diff changeset
   167
        WarnBitmap := img
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   168
    ].
59
450ce95a72a4 *** empty log message ***
claus
parents: 38
diff changeset
   169
    ^ WarnBitmap
184
cbc75a3ba885 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   170
cbc75a3ba885 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   171
    "
cbc75a3ba885 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   172
     self warn:'foo bar'.
cbc75a3ba885 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   173
cbc75a3ba885 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   174
     |box|
cbc75a3ba885 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   175
     box := WarningBox title:'foo bar'.
cbc75a3ba885 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   176
     box showAtPointer.
cbc75a3ba885 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   177
cbc75a3ba885 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   178
     |box|
cbc75a3ba885 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   179
     box := WarningBox title:'foo bar'.
2362
f6ace7307e4d examples fixed (bitmaps access)
Claus Gittinger <cg@exept.de>
parents: 2073
diff changeset
   180
     box image:(Image fromFile:'QUESTION.xpm' inPackage:'stx:goodies/bitmaps/xpmBitmaps').
184
cbc75a3ba885 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   181
     box showAtPointer.
cbc75a3ba885 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   182
    "
cbc75a3ba885 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   183
1365
aa6a855b5013 new resource naming
Claus Gittinger <cg@exept.de>
parents: 1173
diff changeset
   184
    "Created: / 17.11.1995 / 18:16:47 / cg"
1915
cb30b0787270 comment
Claus Gittinger <cg@exept.de>
parents: 1743
diff changeset
   185
    "Modified: / 25.5.1999 / 15:22:25 / cg"
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   186
! !
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   187
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   188
!WarningBox class methodsFor:'styles'!
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   189
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   190
updateStyleCache
1173
86440dfaca06 allow either image or imageFileName to be specified
Claus Gittinger <cg@exept.de>
parents: 693
diff changeset
   191
    "extract values from the styleSheet and cache them in class variables.
86440dfaca06 allow either image or imageFileName to be specified
Claus Gittinger <cg@exept.de>
parents: 693
diff changeset
   192
     Here, the cached infoBitmap is simply flushed."
443
555bb9c7e1be added style resource directive
Claus Gittinger <cg@exept.de>
parents: 355
diff changeset
   193
1173
86440dfaca06 allow either image or imageFileName to be specified
Claus Gittinger <cg@exept.de>
parents: 693
diff changeset
   194
    WarnBitmap := nil
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   195
1173
86440dfaca06 allow either image or imageFileName to be specified
Claus Gittinger <cg@exept.de>
parents: 693
diff changeset
   196
    "Modified: 1.4.1997 / 14:44:59 / cg"
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   197
! !
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   198
79
6d917a89f7b7 *** empty log message ***
claus
parents: 63
diff changeset
   199
!WarningBox methodsFor:'initialization'!
6d917a89f7b7 *** empty log message ***
claus
parents: 63
diff changeset
   200
6d917a89f7b7 *** empty log message ***
claus
parents: 63
diff changeset
   201
initialize
6d917a89f7b7 *** empty log message ***
claus
parents: 63
diff changeset
   202
    super initialize.
6d917a89f7b7 *** empty log message ***
claus
parents: 63
diff changeset
   203
    label := 'Warning'
6d917a89f7b7 *** empty log message ***
claus
parents: 63
diff changeset
   204
! !
6d917a89f7b7 *** empty log message ***
claus
parents: 63
diff changeset
   205
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   206
!WarningBox methodsFor:'realization'!
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   207
493
64ac6d6270f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
   208
openModal
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   209
    "added bell to wake up user"
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   210
693
8369529a2ac4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 644
diff changeset
   211
    self beep.
493
64ac6d6270f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
   212
    super openModal
26
9d08a08ba6a6 *** empty log message ***
claus
parents: 3
diff changeset
   213
493
64ac6d6270f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
   214
    "
64ac6d6270f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
   215
     self warn:'hello'
64ac6d6270f6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
   216
    "
26
9d08a08ba6a6 *** empty log message ***
claus
parents: 3
diff changeset
   217
693
8369529a2ac4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 644
diff changeset
   218
    "Modified: 28.5.1996 / 16:59:01 / cg"
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   219
! !
197
00927189c882 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 184
diff changeset
   220
243
5c411425097d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   221
!WarningBox class methodsFor:'documentation'!
5c411425097d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   222
5c411425097d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   223
version
2468
abb90d63faf2 documentation
Claus Gittinger <cg@exept.de>
parents: 2362
diff changeset
   224
    ^ '$Header: /cvs/stx/stx/libwidg/WarningBox.st,v 1.29 2001-11-15 21:03:22 cg Exp $'
243
5c411425097d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 197
diff changeset
   225
! !