UserMessage.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 20 Dec 2010 07:13:27 +0000
branchjv
changeset 17814 b75a7f0c346b
parent 17807 06cc6c49e291
child 17834 04ff72c5039a
permissions -rw-r--r--
Merged with /trunk
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17761
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
     1
"
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
     2
 COPYRIGHT (c) 2006 by eXept Software AG
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
     3
              All Rights Reserved
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
     4
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
     5
 This software is furnished under a license and may be used
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
     6
 only in accordance with the terms of that license and with the
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
     8
 be provided or otherwise made available to, or used by, any
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
     9
 other person.  No title to or ownership of the software is
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
    10
 hereby transferred.
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
    11
"
6117
013cab950016 +expandMacros
Claus Gittinger <cg@exept.de>
parents: 6008
diff changeset
    12
"{ Package: 'stx:libbasic' }"
5996
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
Object subclass:#UserMessage
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
	instanceVariableNames:'defaultString key catalogID'
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
	classVariableNames:''
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	poolDictionaries:''
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	category:'Interface-Internationalization'
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
!
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
6008
7ac30515dddc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5996
diff changeset
    21
!UserMessage class methodsFor:'documentation'!
7ac30515dddc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5996
diff changeset
    22
17761
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
    23
copyright
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
    24
"
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
    25
 COPYRIGHT (c) 2006 by eXept Software AG
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
    26
              All Rights Reserved
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
    27
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
    28
 This software is furnished under a license and may be used
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
    29
 only in accordance with the terms of that license and with the
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
    31
 be provided or otherwise made available to, or used by, any
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
    32
 other person.  No title to or ownership of the software is
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
    33
 hereby transferred.
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
    34
"
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
    35
!
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
    36
6008
7ac30515dddc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5996
diff changeset
    37
documentation
7ac30515dddc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5996
diff changeset
    38
"
7ac30515dddc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5996
diff changeset
    39
    added for vw5i compatibility, which accesses messageCatalogs
7ac30515dddc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5996
diff changeset
    40
    via:
7ac30515dddc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5996
diff changeset
    41
          (#key << #catalogID >> 'defaultMessage')
7ac30515dddc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5996
diff changeset
    42
    which creates an instance of UserMessage.
7ac30515dddc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5996
diff changeset
    43
7ac30515dddc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5996
diff changeset
    44
    Currently, this is a dummy operation in ST/X, however it is mapped onto
7ac30515dddc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5996
diff changeset
    45
    the resource mechanism, if the given catalogID is the name of a class;
7ac30515dddc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5996
diff changeset
    46
    i.e.
7ac30515dddc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5996
diff changeset
    47
        (YesNoBox classResources string:'continue')
7ac30515dddc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5996
diff changeset
    48
    can now also be written as:
7ac30515dddc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5996
diff changeset
    49
        (#continue << #YesNoBox) 
7ac30515dddc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5996
diff changeset
    50
"
7ac30515dddc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5996
diff changeset
    51
! !
5996
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
!UserMessage class methodsFor:'instance creation'!
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
key:aKeySymbol catalogID:aCatalogSymbol
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
     ^ self new key:aKeySymbol catalogID:aCatalogSymbol
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
!
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
key:aKeySymbol defaultString:aString
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
     ^ self new key:aKeySymbol defaultString:aString
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
! !
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
!UserMessage methodsFor:'accessing'!
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
catalogID
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
     ^ catalogID 
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
!
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
catalogID:aCatalogSymbol
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
     catalogID := aCatalogSymbol
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
!
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
defaultString
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
     ^ defaultString 
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
!
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
defaultString:aString
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
     defaultString := aString
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
!
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
key
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
     ^ key
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
!
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
key:aKeySymbol
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
     key := aKeySymbol.
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
!
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
key:aKeySymbol catalogID:aCatalogSymbol
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
     key := aKeySymbol.
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
     catalogID := aCatalogSymbol
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
!
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
key:aKeySymbol defaultString:aString
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
     key := aKeySymbol.
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
     defaultString := aString
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
! !
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
!UserMessage methodsFor:'converting'!
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
asString
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
    "for now: return the defaultString, ignoring the catalogID."
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
    |str|
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
    str := self lookupInMessageCatalog.
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
    str notNil ifTrue:[ ^ str ].
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
    defaultString notNil ifTrue:[
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
        ^ defaultString
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
    ].
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
    ^ key asString
6117
013cab950016 +expandMacros
Claus Gittinger <cg@exept.de>
parents: 6008
diff changeset
   112
!
013cab950016 +expandMacros
Claus Gittinger <cg@exept.de>
parents: 6008
diff changeset
   113
013cab950016 +expandMacros
Claus Gittinger <cg@exept.de>
parents: 6008
diff changeset
   114
expandMacros
013cab950016 +expandMacros
Claus Gittinger <cg@exept.de>
parents: 6008
diff changeset
   115
    ^ self asString expandMacros
013cab950016 +expandMacros
Claus Gittinger <cg@exept.de>
parents: 6008
diff changeset
   116
013cab950016 +expandMacros
Claus Gittinger <cg@exept.de>
parents: 6008
diff changeset
   117
!
013cab950016 +expandMacros
Claus Gittinger <cg@exept.de>
parents: 6008
diff changeset
   118
013cab950016 +expandMacros
Claus Gittinger <cg@exept.de>
parents: 6008
diff changeset
   119
expandMacrosWith:arg1
013cab950016 +expandMacros
Claus Gittinger <cg@exept.de>
parents: 6008
diff changeset
   120
    ^ self asString expandMacrosWith:arg1
013cab950016 +expandMacros
Claus Gittinger <cg@exept.de>
parents: 6008
diff changeset
   121
17732
a1892eeca6c0 trunk merged into jv branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17711
diff changeset
   122
!
a1892eeca6c0 trunk merged into jv branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17711
diff changeset
   123
a1892eeca6c0 trunk merged into jv branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17711
diff changeset
   124
string
a1892eeca6c0 trunk merged into jv branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17711
diff changeset
   125
    ^ self asString
5996
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
! !
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
6591
586fb5c604ba #displayString
Stefan Vogel <sv@exept.de>
parents: 6117
diff changeset
   128
!UserMessage methodsFor:'printing & storing'!
586fb5c604ba #displayString
Stefan Vogel <sv@exept.de>
parents: 6117
diff changeset
   129
586fb5c604ba #displayString
Stefan Vogel <sv@exept.de>
parents: 6117
diff changeset
   130
displayString
586fb5c604ba #displayString
Stefan Vogel <sv@exept.de>
parents: 6117
diff changeset
   131
586fb5c604ba #displayString
Stefan Vogel <sv@exept.de>
parents: 6117
diff changeset
   132
    |stream|
586fb5c604ba #displayString
Stefan Vogel <sv@exept.de>
parents: 6117
diff changeset
   133
586fb5c604ba #displayString
Stefan Vogel <sv@exept.de>
parents: 6117
diff changeset
   134
    stream := '' writeStream.
586fb5c604ba #displayString
Stefan Vogel <sv@exept.de>
parents: 6117
diff changeset
   135
586fb5c604ba #displayString
Stefan Vogel <sv@exept.de>
parents: 6117
diff changeset
   136
    key storeOn:stream.
586fb5c604ba #displayString
Stefan Vogel <sv@exept.de>
parents: 6117
diff changeset
   137
    stream nextPutAll:' << '.
586fb5c604ba #displayString
Stefan Vogel <sv@exept.de>
parents: 6117
diff changeset
   138
    catalogID storeOn:stream.
6887
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   139
    defaultString notNil ifTrue:[
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   140
        stream nextPutAll:' >> '.
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   141
        defaultString storeOn:stream.
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   142
    ].
6591
586fb5c604ba #displayString
Stefan Vogel <sv@exept.de>
parents: 6117
diff changeset
   143
    ^ stream contents.
586fb5c604ba #displayString
Stefan Vogel <sv@exept.de>
parents: 6117
diff changeset
   144
! !
586fb5c604ba #displayString
Stefan Vogel <sv@exept.de>
parents: 6117
diff changeset
   145
5996
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
!UserMessage methodsFor:'utilities'!
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
<< aSymbol
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
    "set the catalogID"
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
    self catalogID:aSymbol
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
!
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
>> aString
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
    "set the default string"
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
    self defaultString:aString
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
    "
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
     (#theFooMessage << #myMessages >> 'cannot read subclass of metaclass') 
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
    "
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   162
!
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
lookupInMessageCatalog
6887
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   165
    |messageCatalog|
5996
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
6887
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   167
    "/ for now - handle the case that the catalogID is
5996
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
    "/ a classes name; in that case, ask its resourcePack.
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
6887
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   170
    catalogID isSymbol ifTrue:[
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   171
        messageCatalog := Smalltalk at:catalogID.
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   172
    ] ifFalse:[
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   173
        messageCatalog := catalogID.
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   174
    ].
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   175
    messageCatalog isBehavior ifTrue:[
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   176
        messageCatalog := messageCatalog classResources.
5996
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
    ].
6887
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   178
    messageCatalog isNil ifTrue:[
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   179
        defaultString isNil ifTrue:[
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   180
            ^ 'Non-existant message (%1<<%2)' bindWith:key with:catalogID printString.
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   181
        ].
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   182
        ^ defaultString.
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   183
    ].
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   184
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   185
    ^ messageCatalog at:key ifAbsent:defaultString.
5996
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
    "
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
     (#'WARN_RENAME' << #BrowserView >> 'A class named %1 already exists (in ''%2'')\\that class will no longer be visible (i.e. removed) if you continue.\\Continue ?' )
6887
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   189
     (#'WARN_RENAME' << #BrowserView)
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   190
     (#'WARN_RENAME' << BrowserView classResources)
d01c2201398e *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 6591
diff changeset
   191
     (#dontKnow << #nonExistantMessageCatalog) asString
5996
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
    "
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
! !
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
!UserMessage class methodsFor:'documentation'!
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
df75959d85f3 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
version
17814
b75a7f0c346b Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17807
diff changeset
   198
    ^ '$Id: UserMessage.st 10602 2010-12-20 07:13:27Z vranyj1 $'
17732
a1892eeca6c0 trunk merged into jv branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17711
diff changeset
   199
!
a1892eeca6c0 trunk merged into jv branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17711
diff changeset
   200
a1892eeca6c0 trunk merged into jv branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17711
diff changeset
   201
version_CVS
17814
b75a7f0c346b Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17807
diff changeset
   202
    ^ 'Header: /cvs/stx/stx/libbasic/UserMessage.st,v 1.6 2009/10/02 00:08:10 cg Exp '
17761
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
   203
!
17732
a1892eeca6c0 trunk merged into jv branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17711
diff changeset
   204
17761
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
   205
version_SVN
17814
b75a7f0c346b Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17807
diff changeset
   206
    ^ '$Id: UserMessage.st 10602 2010-12-20 07:13:27Z vranyj1 $'
17761
b0e5971141bc Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17735
diff changeset
   207
! !
17767
a4a32df3aa5e merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17761
diff changeset
   208
17772
6e0b3c06c364 Method reverted to r10532
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17767
diff changeset
   209
17780
b6e42c92eba0 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17772
diff changeset
   210
17807
06cc6c49e291 merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17780
diff changeset
   211
17814
b75a7f0c346b Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17807
diff changeset
   212