UIHelpTool.st
author ca
Mon, 04 Nov 2002 10:24:22 +0100
changeset 1646 4d2809c829e0
parent 1622 766547778a34
child 1648 d88ec5777284
permissions -rw-r--r--
reworked... to add/delete and modify keys
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
156
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
     1
"
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
     2
 COPYRIGHT (c) 1995 by eXept Software AG
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
     3
              All Rights Reserved
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
     4
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
     5
 This software is furnished under a license and may be used
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
     6
 only in accordance with the terms of that license and with the
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
     8
 be provided or otherwise made available to, or used by, any
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
     9
 other person.  No title to or ownership of the software is
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    10
 hereby transferred.
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    11
"
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    12
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    13
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    14
1554
d5e4612bf7cf implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents: 1506
diff changeset
    15
"{ Package: 'stx:libtool2' }"
d5e4612bf7cf implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents: 1506
diff changeset
    16
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
    17
ToolApplicationModel subclass:#UIHelpTool
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
    18
	instanceVariableNames:'specClass specSelector dictionary dictionaries modifiedHolder
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
    19
		modified listOfKeys listOfKeysModel listOfClasses
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
    20
		listOfClassesModel contentsModifiedChannel editModel editTextView'
148
785417b6955d intitial checkin
ca
parents:
diff changeset
    21
	classVariableNames:''
785417b6955d intitial checkin
ca
parents:
diff changeset
    22
	poolDictionaries:''
785417b6955d intitial checkin
ca
parents:
diff changeset
    23
	category:'Interface-UIPainter'
785417b6955d intitial checkin
ca
parents:
diff changeset
    24
!
785417b6955d intitial checkin
ca
parents:
diff changeset
    25
785417b6955d intitial checkin
ca
parents:
diff changeset
    26
!UIHelpTool class methodsFor:'documentation'!
785417b6955d intitial checkin
ca
parents:
diff changeset
    27
156
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    28
copyright
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    29
"
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    30
 COPYRIGHT (c) 1995 by eXept Software AG
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    31
              All Rights Reserved
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    32
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    33
 This software is furnished under a license and may be used
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    34
 only in accordance with the terms of that license and with the
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    35
 inclusion of the above copyright notice.   This software may not
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    36
 be provided or otherwise made available to, or used by, any
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    37
 other person.  No title to or ownership of the software is
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    38
 hereby transferred.
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    39
"
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    40
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    41
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    42
!
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    43
148
785417b6955d intitial checkin
ca
parents:
diff changeset
    44
documentation
785417b6955d intitial checkin
ca
parents:
diff changeset
    45
"
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
    46
    The Help Tool allows you to define help dictionaries for the widgets in
761
91e524583390 do not save, if help texts have not changed (unformatting)
tz
parents: 750
diff changeset
    47
    window applications. The tool are able to run stand alone or in other master 
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
    48
    applications like the GUI Painter and the Menu Editor.
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
    49
    If the application responds to the selector #showHelp:aHelpText for:aView,
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
    50
    this selector is called by the widget's view when the mouse cursor moves over. 
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
    51
    If the application does not responds to that selector, and the activeHelp mode
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
    52
    is enabled, an active help bubble is shown at the widget's view.
156
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    53
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
    54
    [instance variables:]
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
    55
        specClass       <Symbol>        class implementing the help spec
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
    56
        specSelector    <Symbol>        selector returning the help spec
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
    57
        dictionary      <Dictionary>    dictionary containing pairs of help keys/texts
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
    58
        dictionaries    <Dictionary>    dictionary containing pairs of help spec classes/help dictionaries
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
    59
        listSelection   <String>        current selected help key
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
    60
        maxCharsPerLine <Integer>       maximum number of allowed characters per text line
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
    61
        modifiedHolder  <ValueHolder>   value holder for setting as modified
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
    62
        modified        <Boolean>       flag whether the help spec was modified
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
    63
156
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    64
    [author:]
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
    65
        Claus Atzkern, eXept Software AG
9b705e31d38e some cleans
tz
parents: 740
diff changeset
    66
        Thomas Zwick, eXept Software AG
148
785417b6955d intitial checkin
ca
parents:
diff changeset
    67
"
785417b6955d intitial checkin
ca
parents:
diff changeset
    68
! !
785417b6955d intitial checkin
ca
parents:
diff changeset
    69
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
    70
!UIHelpTool class methodsFor:'instance creation'!
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
    71
832
2c5b61b168e8 allow #open (its in the docu !)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
    72
open
833
ff2f237a309a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
    73
    ^ self openOnClass:nil.
832
2c5b61b168e8 allow #open (its in the docu !)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
    74
833
ff2f237a309a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
    75
"/    |className cls|
ff2f237a309a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
    76
"/
ff2f237a309a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
    77
"/    className := Dialog request:(ClassResources string:'Open on which class ?').
ff2f237a309a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
    78
"/    className size > 0 ifTrue:[
ff2f237a309a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
    79
"/        cls := Smalltalk at:className asSymbol.
ff2f237a309a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
    80
"/        cls notNil ifTrue:[
ff2f237a309a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
    81
"/            ^ self openOnClass:cls.
ff2f237a309a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
    82
"/        ].
ff2f237a309a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
    83
"/        self warn:(ClassResources string:'No such class').
ff2f237a309a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
    84
"/    ].
ff2f237a309a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
    85
"/
ff2f237a309a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
    86
"/    "Created: / 20.5.1998 / 00:55:05 / cg"
ff2f237a309a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
    87
"/
832
2c5b61b168e8 allow #open (its in the docu !)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
    88
833
ff2f237a309a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
    89
    "Modified: / 20.5.1998 / 01:06:07 / cg"
832
2c5b61b168e8 allow #open (its in the docu !)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
    90
!
2c5b61b168e8 allow #open (its in the docu !)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
    91
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
    92
openOnClass:aClass
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
    93
    "opens a Help Tool on aClass"
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
    94
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
    95
    ^ self openOnClass:aClass andSelector:#helpSpec
833
ff2f237a309a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
    96
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
    97
    "
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
    98
     UIHelpTool openOnClass:self
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
    99
    "
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   100
833
ff2f237a309a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
   101
    "Modified: / 20.5.1998 / 01:06:14 / cg"
940
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
   102
!
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
   103
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
   104
openOnClass:aClass andSelector: aSelector
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
   105
    "opens a Help Tool on aClass and aSelector"
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
   106
946
536722005e32 fixed #openOnClass:andSelector:
tz
parents: 940
diff changeset
   107
    ^self new openOnClass:aClass andSelector: aSelector
940
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
   108
  
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   109
! !
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   110
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   111
!UIHelpTool class methodsFor:'constants'!
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   112
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   113
label
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   114
    "returns the label; used if embedded as sub canvas in the GUI Painter or Menu Editor"
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   115
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   116
    ^'Help'
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   117
! !
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   118
151
ca
parents: 148
diff changeset
   119
!UIHelpTool class methodsFor:'help specs'!
ca
parents: 148
diff changeset
   120
ca
parents: 148
diff changeset
   121
helpSpec
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   122
    "This resource specification was automatically generated
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   123
     by the UIHelpTool of ST/X."
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   124
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   125
    "Do not manually edit this!! If it is corrupted,
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   126
     the UIHelpTool may not be able to read the specification."
292
af69e3e025a9 an empty selection is specified by 0
ca
parents: 286
diff changeset
   127
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 156
diff changeset
   128
    "
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   129
     UIHelpTool openOnClass:UIHelpTool    
292
af69e3e025a9 an empty selection is specified by 0
ca
parents: 286
diff changeset
   130
    "
af69e3e025a9 an empty selection is specified by 0
ca
parents: 286
diff changeset
   131
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   132
    <resource: #help>
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   133
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   134
    ^super helpSpec addPairsFrom:#(
151
ca
parents: 148
diff changeset
   135
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   136
#addHelpTextKey
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   137
'Adds the key to the help spec.'
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   138
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   139
#currentHelpTexts
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   140
'Selected help text key.'
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   141
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   142
#deleteHelpTextKey
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   143
'Deletes the key from the help spec.'
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   144
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   145
#fileLoad
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   146
'Opens a dialog for selecting and loading a help spec from a class.'
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   147
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   148
#fileSave
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   149
'Saves the current help spec.'
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   150
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   151
#fileUpdate
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   152
'Reload the help spec.'
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   153
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   154
#helpTextView
1622
766547778a34 Help strings
Stefan Vogel <sv@exept.de>
parents: 1620
diff changeset
   155
'Shows the help text. Menu action ''Accept'' commits changes'
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   156
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   157
#listOfClasses
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   158
'Classes where help specs can be/are implemented.'
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   159
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   160
#listOfHelpTexts
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   161
'List of help text keys.'
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   162
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   163
#removeHelpTextKey
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   164
'Removes the help message from the widget.'
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 156
diff changeset
   165
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   166
#updateHelpTextKey
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   167
'Refetch the help spec.'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   168
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 156
diff changeset
   169
)
151
ca
parents: 148
diff changeset
   170
! !
ca
parents: 148
diff changeset
   171
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   172
!UIHelpTool class methodsFor:'interface specs'!
785417b6955d intitial checkin
ca
parents:
diff changeset
   173
785417b6955d intitial checkin
ca
parents:
diff changeset
   174
windowSpec
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   175
    "This resource specification was automatically generated
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   176
     by the UIPainter of ST/X."
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   177
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   178
    "Do not manually edit this!! If it is corrupted,
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   179
     the UIPainter may not be able to read the specification."
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   180
785417b6955d intitial checkin
ca
parents:
diff changeset
   181
    "
151
ca
parents: 148
diff changeset
   182
     UIPainter new openOnClass:UIHelpTool andSelector:#windowSpec
ca
parents: 148
diff changeset
   183
     UIHelpTool new openInterface:#windowSpec
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   184
     UIHelpTool open
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   185
    "
785417b6955d intitial checkin
ca
parents:
diff changeset
   186
785417b6955d intitial checkin
ca
parents:
diff changeset
   187
    <resource: #canvas>
785417b6955d intitial checkin
ca
parents:
diff changeset
   188
1302
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   189
    ^ 
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   190
     #(#FullSpec
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   191
        #name: #windowSpec
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   192
        #window: 
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   193
       #(#WindowSpec
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   194
          #label: 'Help Tool'
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   195
          #name: 'Help Tool'
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   196
          #min: #(#Point 10 10)
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   197
          #max: #(#Point 1160 870)
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   198
          #bounds: #(#Rectangle 31 306 317 577)
1302
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   199
        )
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   200
        #component: 
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   201
       #(#SpecCollection
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   202
          #collection: #(
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   203
           #(#VariableVerticalPanelSpec
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   204
              #name: 'VariableVerticalPanel'
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   205
              #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   206
              #component: 
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   207
             #(#SpecCollection
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   208
                #collection: #(
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   209
                 #(#VariableHorizontalPanelSpec
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   210
                    #name: 'VariableHorizontalPanel'
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   211
                    #component: 
1302
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   212
                   #(#SpecCollection
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   213
                      #collection: #(
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   214
                       #(#SelectionInListModelViewSpec
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   215
                          #name: 'listOfKeys'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   216
                          #activeHelpKey: #listOfHelpTexts
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   217
                          #model: #listOfKeysModel
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   218
                          #menu: #listOfKeysMenu
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   219
                          #hasHorizontalScrollBar: true
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   220
                          #hasVerticalScrollBar: true
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   221
                          #miniScrollerHorizontal: true
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   222
                          #listModel: #listOfKeys
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   223
                          #useIndex: false
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   224
                          #highlightMode: #line
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   225
                        )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   226
                       #(#ViewSpec
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   227
                          #name: 'Box'
1302
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   228
                          #component: 
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   229
                         #(#SpecCollection
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   230
                            #collection: #(
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   231
                             #(#InputFieldSpec
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   232
                                #name: 'helpKeyInputField'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   233
                                #layout: #(#LayoutFrame 2 0.0 2 0 -2 1.0 25 0)
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   234
                                #activeHelpKey: #currentHelpTexts
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   235
                                #tabable: true
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   236
                                #model: #editModel
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   237
                                #immediateAccept: true
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   238
                                #acceptOnReturn: false
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   239
                                #acceptOnTab: false
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   240
                                #acceptOnPointerLeave: false
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   241
                              )
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   242
                             #(#SelectionInListModelViewSpec
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   243
                                #name: 'listOfClasses'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   244
                                #layout: #(#LayoutFrame 0 0.0 27 0 0 1.0 0 1.0)
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   245
                                #activeHelpKey: #listOfClasses
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   246
                                #model: #listOfClassesModel
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   247
                                #hasHorizontalScrollBar: true
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   248
                                #hasVerticalScrollBar: true
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   249
                                #miniScrollerHorizontal: true
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   250
                                #miniScrollerVertical: true
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   251
                                #listModel: #listOfClasses
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   252
                                #useIndex: false
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   253
                                #highlightMode: #line
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   254
                              )
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   255
                             )
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   256
                           
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   257
                          )
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   258
                        )
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   259
                       )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   260
                     
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   261
                    )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   262
                    #handles: #(#Any 0.5 1.0)
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   263
                  )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   264
                 #(#ViewSpec
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   265
                    #name: 'Box1'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   266
                    #component: 
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   267
                   #(#SpecCollection
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   268
                      #collection: #(
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   269
                       #(#MenuPanelSpec
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   270
                          #name: 'helpTextMenu'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   271
                          #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 24 0)
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   272
                          #menu: #helpTextMenu
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   273
                          #textDefault: true
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   274
                        )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   275
                       #(#TextEditorSpec
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   276
                          #name: 'helpTextView'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   277
                          #layout: #(#LayoutFrame 0 0.0 24 0.0 0 1.0 0 1.0)
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   278
                          #activeHelpKey: #helpTextView
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   279
                          #tabable: true
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   280
                          #hasHorizontalScrollBar: true
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   281
                          #hasVerticalScrollBar: true
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   282
                          #miniScrollerHorizontal: true
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   283
                          #miniScrollerVertical: true
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   284
                          #modifiedChannel: #contentsModifiedChannel
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   285
                          #postBuildCallback: #postBuildTextView:
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   286
                        )
1302
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   287
                       )
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   288
                     
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   289
                    )
1302
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   290
                  )
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   291
                 )
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   292
               
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   293
              )
1302
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   294
              #handles: #(#Any 0.5 1.0)
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   295
            )
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   296
           )
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   297
         
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   298
        )
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   299
      )
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   300
!
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   301
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   302
windowSpecForStandAlone
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   303
    "This resource specification was automatically generated
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   304
     by the UIPainter of ST/X."
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   305
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   306
    "Do not manually edit this!! If it is corrupted,
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   307
     the UIPainter may not be able to read the specification."
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   308
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   309
    "
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   310
     UIPainter new openOnClass:UIHelpTool andSelector:#windowSpecForStandAlone
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   311
     UIHelpTool new openInterface:#windowSpecForStandAlone
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   312
    "
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   313
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   314
    <resource: #canvas>
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   315
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   316
    ^ 
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   317
     #(#FullSpec
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   318
        #name: #windowSpecForStandAlone
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   319
        #window: 
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   320
       #(#WindowSpec
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   321
          #label: 'Help Tool'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   322
          #name: 'Help Tool'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   323
          #min: #(#Point 300 300)
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   324
          #max: #(#Point 1152 900)
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   325
          #bounds: #(#Rectangle 83 333 796 896)
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   326
          #menu: #menu
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   327
        )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   328
        #component: 
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   329
       #(#SpecCollection
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   330
          #collection: #(
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   331
           #(#UISubSpecification
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   332
              #name: 'windowSpec'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   333
              #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -26 1.0)
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   334
              #minorKey: #windowSpec
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   335
            )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   336
           #(#UISubSpecification
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   337
              #name: 'windowSpecForInfoBar'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   338
              #layout: #(#LayoutFrame 0 0 -24 1 0 1 0 1)
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   339
              #majorKey: #ToolApplicationModel
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   340
              #minorKey: #windowSpecForInfoBar
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   341
            )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   342
           )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   343
         
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   344
        )
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   345
      )
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   346
! !
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   347
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   348
!UIHelpTool class methodsFor:'menu specs'!
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   349
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   350
helpTextMenu
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   351
    "This resource specification was automatically generated
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   352
     by the MenuEditor of ST/X."
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   353
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   354
    "Do not manually edit this!! If it is corrupted,
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   355
     the MenuEditor may not be able to read the specification."
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   356
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   357
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   358
     MenuEditor new openOnClass:UIHelpTool andSelector:#helpTextMenu
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   359
     (Menu new fromLiteralArrayEncoding:(UIHelpTool helpTextMenu)) startUp
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   360
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   361
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   362
    <resource: #menu>
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   363
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   364
    ^ 
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   365
     #(#Menu
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   366
        #(
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   367
         #(#MenuItem
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   368
            #activeHelpKey: #commitOK
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   369
            #enabled: #contentsModifiedChannel
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   370
            #label: 'Accept'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   371
            #itemValue: #accept
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   372
            #translateLabel: true
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   373
          )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   374
         #(#MenuItem
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   375
            #activeHelpKey: #commitCancel
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   376
            #enabled: #contentsModifiedChannel
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   377
            #label: 'Cancel'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   378
            #itemValue: #cancel
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   379
            #translateLabel: true
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   380
          )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   381
         )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   382
        nil
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   383
        nil
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   384
      )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   385
!
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   386
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   387
listOfKeysMenu
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   388
    "This resource specification was automatically generated
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   389
     by the MenuEditor of ST/X."
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   390
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   391
    "Do not manually edit this!! If it is corrupted,
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   392
     the MenuEditor may not be able to read the specification."
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   393
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   394
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   395
     MenuEditor new openOnClass:UIHelpTool andSelector:#listOfKeysMenu
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   396
     (Menu new fromLiteralArrayEncoding:(UIHelpTool listOfKeysMenu)) startUp
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   397
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   398
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   399
    <resource: #menu>
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   400
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   401
    ^ 
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   402
     #(#Menu
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   403
        #(
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   404
         #(#MenuItem
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   405
            #activeHelpKey: #deleteHelpTextKey
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   406
            #label: 'Delete'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   407
            #itemValue: #doDelete
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   408
            #translateLabel: true
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   409
          )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   410
         )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   411
        nil
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   412
        nil
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   413
      )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   414
!
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   415
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   416
menu
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   417
    "This resource specification was automatically generated
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   418
     by the MenuEditor of ST/X."
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   419
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   420
    "Do not manually edit this!! If it is corrupted,
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   421
     the MenuEditor may not be able to read the specification."
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   422
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   423
    "
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   424
     MenuEditor new openOnClass:UIHelpTool andSelector:#menu
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   425
     (Menu new fromLiteralArrayEncoding:(UIHelpTool menu)) startUp
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   426
    "
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   427
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   428
    <resource: #menu>
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   429
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   430
    ^ 
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   431
     #(#Menu
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   432
        #(
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   433
         #(#MenuItem
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   434
            #label: 'File'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   435
            #translateLabel: true
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   436
            #submenu: 
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   437
           #(#Menu
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   438
              #(
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   439
               #(#MenuItem
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   440
                  #activeHelpKey: #fileLoad
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   441
                  #label: 'Load...'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   442
                  #itemValue: #doLoad
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   443
                  #translateLabel: true
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   444
                )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   445
               #(#MenuItem
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   446
                  #activeHelpKey: #fileSave
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   447
                  #label: 'Save'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   448
                  #itemValue: #doSave
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   449
                  #translateLabel: true
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   450
                )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   451
               #(#MenuItem
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   452
                  #label: '-'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   453
                )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   454
               #(#MenuItem
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   455
                  #activeHelpKey: #fileExit
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   456
                  #label: 'Exit'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   457
                  #itemValue: #closeRequest
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   458
                  #translateLabel: true
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   459
                )
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   460
               )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   461
              nil
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   462
              nil
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   463
            )
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   464
          )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   465
         #(#MenuItem
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   466
            #label: 'Edit'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   467
            #translateLabel: true
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   468
            #submenu: 
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   469
           #(#Menu
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   470
              #(
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   471
               #(#MenuItem
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   472
                  #activeHelpKey: #deleteHelpTextKey
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   473
                  #label: 'Delete'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   474
                  #itemValue: #doDelete
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   475
                  #translateLabel: true
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   476
                )
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   477
               )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   478
              nil
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   479
              nil
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   480
            )
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   481
          )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   482
         #(#MenuItem
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   483
            #activeHelpKey: #help
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   484
            #label: 'Help'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   485
            #translateLabel: true
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   486
            #startGroup: #right
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   487
            #submenuChannel: #menuHelp
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   488
          )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   489
         )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   490
        nil
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   491
        nil
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   492
      )
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   493
! !
785417b6955d intitial checkin
ca
parents:
diff changeset
   494
785417b6955d intitial checkin
ca
parents:
diff changeset
   495
!UIHelpTool methodsFor:'accessing'!
785417b6955d intitial checkin
ca
parents:
diff changeset
   496
710
8c968790c885 use same help dict if started from the gui painter
tz
parents: 704
diff changeset
   497
dictionaries
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   498
    "returns the dictionary of the help dictionaries of the classes having help specs"
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   499
710
8c968790c885 use same help dict if started from the gui painter
tz
parents: 704
diff changeset
   500
    ^dictionaries
8c968790c885 use same help dict if started from the gui painter
tz
parents: 704
diff changeset
   501
!
8c968790c885 use same help dict if started from the gui painter
tz
parents: 704
diff changeset
   502
8c968790c885 use same help dict if started from the gui painter
tz
parents: 704
diff changeset
   503
dictionaries:aDictionaryOfDictionaries
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   504
    "sets a dictionary of the help dictionaries of the classes having help specs"
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   505
710
8c968790c885 use same help dict if started from the gui painter
tz
parents: 704
diff changeset
   506
    (dictionaries := aDictionaryOfDictionaries) isNil ifTrue:[
8c968790c885 use same help dict if started from the gui painter
tz
parents: 704
diff changeset
   507
        dictionaries := Dictionary new.
8c968790c885 use same help dict if started from the gui painter
tz
parents: 704
diff changeset
   508
    ].
715
7eebac822985 modified bug fixed
tz
parents: 710
diff changeset
   509
    self updateList.
710
8c968790c885 use same help dict if started from the gui painter
tz
parents: 704
diff changeset
   510
!
8c968790c885 use same help dict if started from the gui painter
tz
parents: 704
diff changeset
   511
151
ca
parents: 148
diff changeset
   512
dictionary
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   513
    "returns the dictionary of the selected class"
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   514
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
   515
    ^dictionary
710
8c968790c885 use same help dict if started from the gui painter
tz
parents: 704
diff changeset
   516
!
151
ca
parents: 148
diff changeset
   517
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   518
helpKey
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   519
    "returns the help key as symbol or nil
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   520
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   521
    |value|
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   522
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   523
    value := editModel value.
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   524
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   525
    value notNil ifTrue:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   526
        value := value withoutSeparators.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   527
        value notEmpty ifTrue:[ ^ value asSymbol ]
151
ca
parents: 148
diff changeset
   528
    ].
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   529
    ^ nil
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   530
!
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   531
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   532
helpKey:aKey
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   533
    "sets the help key into the selection channel in order to show the help text"
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   534
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   535
    |key|
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   536
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   537
    aKey size ~~ 0 ifTrue:[
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   538
        aKey isSymbol ifTrue:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   539
            key := aKey
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   540
        ] ifFalse:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   541
            key := aKey withoutSeparators.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   542
            key notEmpty ifTrue:[ key := key asSymbol ]
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   543
                        ifFalse:[ key := nil ].
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   544
        ]
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   545
    ] ifFalse:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   546
        key := nil
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   547
    ].
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   548
    editModel value:key.            
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   549
    self cancel.
151
ca
parents: 148
diff changeset
   550
!
ca
parents: 148
diff changeset
   551
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   552
modified
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   553
    "true if the helpSpec is modified, items are added, deleted or modified
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   554
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   555
    ^ modified
700
2aae4f3b6526 supports merging into existing help specs
tz
parents: 696
diff changeset
   556
!
2aae4f3b6526 supports merging into existing help specs
tz
parents: 696
diff changeset
   557
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   558
modified: aBoolean
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   559
    "true if the helpSpec is modified, items are added, deleted or modified
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   560
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   561
    modified := aBoolean.
700
2aae4f3b6526 supports merging into existing help specs
tz
parents: 696
diff changeset
   562
!
2aae4f3b6526 supports merging into existing help specs
tz
parents: 696
diff changeset
   563
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   564
modifiedHolder:aValueHolder
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   565
    "sets the value holder to true in case of modifying attributes"
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   566
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   567
    modifiedHolder notNil ifTrue:[
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   568
        modifiedHolder removeDependent:self. 
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   569
    ].
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   570
    modifiedHolder := aValueHolder.
459
fb5b5ecf7e86 set modified if help text has changed
tz
parents: 456
diff changeset
   571
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   572
    modifiedHolder notNil ifTrue:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   573
        modifiedHolder addDependent:self.
459
fb5b5ecf7e86 set modified if help text has changed
tz
parents: 456
diff changeset
   574
    ]
715
7eebac822985 modified bug fixed
tz
parents: 710
diff changeset
   575
!
7eebac822985 modified bug fixed
tz
parents: 710
diff changeset
   576
1604
69dc29cf0fc5 *** empty log message ***
ca
parents: 1597
diff changeset
   577
setHelpKey:aKey
69dc29cf0fc5 *** empty log message ***
ca
parents: 1597
diff changeset
   578
    "set the helpKey without notification
69dc29cf0fc5 *** empty log message ***
ca
parents: 1597
diff changeset
   579
    "
69dc29cf0fc5 *** empty log message ***
ca
parents: 1597
diff changeset
   580
    |model|
69dc29cf0fc5 *** empty log message ***
ca
parents: 1597
diff changeset
   581
69dc29cf0fc5 *** empty log message ***
ca
parents: 1597
diff changeset
   582
    model := modifiedHolder.
69dc29cf0fc5 *** empty log message ***
ca
parents: 1597
diff changeset
   583
    modifiedHolder := nil.
69dc29cf0fc5 *** empty log message ***
ca
parents: 1597
diff changeset
   584
    self helpKey:aKey.
69dc29cf0fc5 *** empty log message ***
ca
parents: 1597
diff changeset
   585
    modifiedHolder := model.
69dc29cf0fc5 *** empty log message ***
ca
parents: 1597
diff changeset
   586
!
69dc29cf0fc5 *** empty log message ***
ca
parents: 1597
diff changeset
   587
715
7eebac822985 modified bug fixed
tz
parents: 710
diff changeset
   588
specClass
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   589
    "returns the class on which the help tool works
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   590
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   591
    ^ specClass
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   592
!
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   593
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   594
specSelector
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   595
    "returns the selector on which the class is opened
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   596
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   597
    ^ specSelector
354
a6de8821d3bf add & remove popUpMenu
Claus Gittinger <cg@exept.de>
parents: 339
diff changeset
   598
! !
a6de8821d3bf add & remove popUpMenu
Claus Gittinger <cg@exept.de>
parents: 339
diff changeset
   599
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   600
!UIHelpTool methodsFor:'aspects'!
785417b6955d intitial checkin
ca
parents:
diff changeset
   601
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   602
contentsModifiedChannel
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   603
    "returns the model which indicates whether the current helpText is modified
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   604
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   605
    ^ contentsModifiedChannel
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   606
!
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   607
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   608
editModel
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   609
    "returns the model which keeps the current editing key
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   610
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   611
    ^ editModel
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   612
!
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   613
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   614
listOfClasses
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   615
    "returns the list which keeps the classes
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   616
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   617
    ^ listOfClasses
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   618
!
785417b6955d intitial checkin
ca
parents:
diff changeset
   619
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   620
listOfClassesModel
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   621
    "returns the model which keeps the current class selection
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   622
     or nil
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   623
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   624
    ^ listOfClassesModel
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   625
!
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   626
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   627
listOfKeys
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   628
    "returns the list which keeps the current keys
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   629
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   630
    ^ listOfKeys
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   631
!
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   632
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   633
listOfKeysModel
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   634
    "returns the model which keeps the current list selection
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   635
     or nil
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   636
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   637
    ^ listOfKeysModel
1336
3c84dc6f8d4b delegate valueOfInfoLabel to masterApplication if exists
ca
parents: 1329
diff changeset
   638
!
3c84dc6f8d4b delegate valueOfInfoLabel to masterApplication if exists
ca
parents: 1329
diff changeset
   639
3c84dc6f8d4b delegate valueOfInfoLabel to masterApplication if exists
ca
parents: 1329
diff changeset
   640
valueOfInfoLabel
3c84dc6f8d4b delegate valueOfInfoLabel to masterApplication if exists
ca
parents: 1329
diff changeset
   641
3c84dc6f8d4b delegate valueOfInfoLabel to masterApplication if exists
ca
parents: 1329
diff changeset
   642
    masterApplication notNil ifTrue:[
3c84dc6f8d4b delegate valueOfInfoLabel to masterApplication if exists
ca
parents: 1329
diff changeset
   643
        ^ masterApplication valueOfInfoLabel
3c84dc6f8d4b delegate valueOfInfoLabel to masterApplication if exists
ca
parents: 1329
diff changeset
   644
    ].
3c84dc6f8d4b delegate valueOfInfoLabel to masterApplication if exists
ca
parents: 1329
diff changeset
   645
    ^ super valueOfInfoLabel
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   646
! !
785417b6955d intitial checkin
ca
parents:
diff changeset
   647
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   648
!UIHelpTool methodsFor:'building'!
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   649
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   650
buildFromClass:aClass
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   651
    "reads the help dictionary from aClass and find remaining classes 
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   652
     'between' aClass and ApplicationModel" 
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   653
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   654
    |list|
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   655
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   656
    modified  := false.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   657
    specClass := self getHelpSpecClassFromClass:aClass.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   658
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   659
    specClass notNil ifTrue:[   
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   660
        dictionary   := Dictionary new.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   661
        dictionaries removeAll.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   662
    ].
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   663
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   664
    (specClass isClass and:[specClass isLoaded]) ifFalse:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   665
        self updateList.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   666
        ^ self
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   667
    ].
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   668
    (specClass class includesSelector:specSelector) ifFalse:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   669
        dictionaries at:(specClass name) put:dictionary. 
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   670
    ].
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   671
    list := specClass withAllSuperclasses reverse collect:[:cls| cls name ].
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   672
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   673
    (list includes: #ApplicationModel) ifTrue:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   674
        list := list asOrderedCollection.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   675
        list removeAll:(ApplicationModel withAllSuperclasses collect:[:cls| cls name])
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   676
    ].
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   677
    listOfClasses contents:list.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   678
    listOfClassesModel triggerValue:(specClass name).
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   679
!
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   680
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   681
buildFromClass: aClass andSelector: aSelector
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   682
    "sets aSelector and reads the help dictionary from aClass"
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   683
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   684
    specSelector := aSelector.
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   685
    self buildFromClass:aClass
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   686
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   687
!
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   688
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   689
buildFromHelpTool:aHelpTool
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   690
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   691
    self doNew.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   692
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   693
    dictionaries := aHelpTool dictionaries.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   694
    dictionary   := aHelpTool dictionary.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   695
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   696
    specSelector := aHelpTool specSelector.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   697
    specClass    := aHelpTool specClass.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   698
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   699
    listOfClasses contents:(aHelpTool listOfClasses).
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   700
    listOfClassesModel triggerValue:(listOfClasses at:1 ifAbsent:nil).
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   701
! !
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   702
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   703
!UIHelpTool methodsFor:'change & update'!
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   704
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   705
editModelChanged
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   706
    "called if the edit model changed
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   707
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   708
    |key|
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   709
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   710
    key := self helpKey.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   711
    modifiedHolder notNil ifTrue:[ modifiedHolder value:true ].
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   712
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   713
    (key notNil and:[(dictionary at:key ifAbsent:nil) isNil]) ifTrue:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   714
        listOfClasses do:[:name| |dir|
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   715
            dir := self dictionaryForClassNamed:name.
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   716
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   717
            (dir includesKey:key) ifTrue:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   718
                "/ setup new class
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   719
                listOfKeysModel setValue:key.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   720
                listOfClassesModel value:name.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   721
                ^ self
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   722
            ].
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   723
        ].
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   724
        key := nil.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   725
    ].
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   726
    listOfKeysModel value:key.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   727
!
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   728
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   729
listOfClassesModelChanged
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   730
    "called if the class selection changed
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   731
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   732
    |clsName|
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   733
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   734
    clsName := listOfClassesModel value.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   735
    clsName isNil ifTrue:[^ self].
963
62cdb7923a3b care for setup, before view components are built
Claus Gittinger <cg@exept.de>
parents: 946
diff changeset
   736
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   737
    dictionary := self dictionaryForClassNamed:clsName.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   738
    self updateList.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   739
!
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   740
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   741
listOfKeysModelChanged
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   742
    "called if the selection of the key list changed
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   743
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   744
    |key txt|
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   745
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   746
    key := listOfKeysModel value.
963
62cdb7923a3b care for setup, before view components are built
Claus Gittinger <cg@exept.de>
parents: 946
diff changeset
   747
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   748
    key notNil ifTrue:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   749
        key := key asSymbol.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   750
        txt := dictionary at:key ifAbsent:nil.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   751
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   752
        txt isNil ifTrue:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   753
            listOfKeysModel value:nil.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   754
            ^ self
963
62cdb7923a3b care for setup, before view components are built
Claus Gittinger <cg@exept.de>
parents: 946
diff changeset
   755
        ].
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   756
        editModel value ~= key ifTrue:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   757
            editModel value:key withoutNotifying:self.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   758
            modifiedHolder notNil ifTrue:[ modifiedHolder value:true ].
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   759
        ].
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   760
    ].
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   761
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   762
    contentsModifiedChannel value ifFalse:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   763
        self cancel
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   764
    ].
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   765
!
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   766
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   767
update:something with:aParameter from:changedObject
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   768
    "Invoked when an object that I depend upon sends a change notification."
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   769
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   770
    editModel == changedObject ifTrue:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   771
        self editModelChanged.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   772
        ^ self
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   773
    ].
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
   774
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   775
    listOfKeysModel == changedObject ifTrue:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   776
        self listOfKeysModelChanged.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   777
        ^ self
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   778
    ].
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1554
diff changeset
   779
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   780
    listOfClassesModel == changedObject ifTrue:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   781
        self listOfClassesModelChanged.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   782
        ^ self
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   783
    ].
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   784
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   785
    contentsModifiedChannel == changedObject ifTrue:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   786
        contentsModifiedChannel value ifTrue:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   787
            modifiedHolder notNil ifTrue:[modifiedHolder value:true].
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1554
diff changeset
   788
        ].
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   789
        ^ self
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   790
    ].
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   791
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   792
    super update:something with:aParameter from:changedObject
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   793
! !
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   794
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   795
!UIHelpTool methodsFor:'help'!
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   796
904
b40cce7f3748 use standard help calls
tz
parents: 896
diff changeset
   797
openDocumentation
b40cce7f3748 use standard help calls
tz
parents: 896
diff changeset
   798
    "opens the documentation file of the Help Tool"
b40cce7f3748 use standard help calls
tz
parents: 896
diff changeset
   799
b40cce7f3748 use standard help calls
tz
parents: 896
diff changeset
   800
    self openHTMLDocument: 'tools/uipainter/HelpTool.html'
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   801
! !
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   802
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   803
!UIHelpTool methodsFor:'private'!
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   804
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   805
askForModification
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   806
    "asks for modification"
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   807
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   808
    modified ifTrue:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   809
        ( (YesNoBox title: 'List was modified!!')        
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   810
                   noText:'Cancel';
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   811
                  yesText:'Waste it and proceed';
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   812
            showAtPointer;
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   813
            accepted
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   814
        ) ifFalse:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   815
            ^ false
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   816
        ].
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   817
        modified := false
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   818
    ].
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   819
    ^ true
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   820
!
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   821
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1554
diff changeset
   822
dictionaryForClassNamed:clsName
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   823
    "returns the directory assigned to a class name
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   824
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   825
    ^ dictionaries at:clsName
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   826
          ifAbsentPut:[ self extractHelpSpecForClass: (Smalltalk at:clsName) ].
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   827
!
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   828
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   829
extractHelpSpecForClass: aClass
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   830
    "extracts the help dictionary of aClass, it current and return it"
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   831
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   832
    |helpSpecSuperClass superHelpSpecKeys helpSpec|
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   833
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   834
    helpSpec := Dictionary new.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   835
1554
d5e4612bf7cf implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents: 1506
diff changeset
   836
    ((aClass class includesSelector: specSelector)
d5e4612bf7cf implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents: 1506
diff changeset
   837
    and: [(helpSpecSuperClass := aClass allSuperclasses detect: [:cls| cls class includesSelector: specSelector] ifNone: nil) notNil])
1198
6b7cfe55105b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1184
diff changeset
   838
    ifTrue:[                  
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   839
        superHelpSpecKeys := helpSpecSuperClass helpSpec keys.
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   840
1198
6b7cfe55105b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1184
diff changeset
   841
        aClass helpSpec keysAndValuesDo:[:key :value |
6b7cfe55105b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1184
diff changeset
   842
            (superHelpSpecKeys includes:key) ifFalse: [
6b7cfe55105b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1184
diff changeset
   843
                helpSpec at:key put:value
6b7cfe55105b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1184
diff changeset
   844
            ]
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   845
        ].          
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   846
    ].
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   847
    ^ helpSpec 
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   848
!
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   849
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   850
getHelpSpecClassFromClass:aClass
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   851
    "returns application class keeping the associated help text or nil"
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   852
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   853
    |cls|
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   854
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   855
    ((cls := self resolveName:aClass) notNil and:[cls respondsTo: #helpSpecClass]) ifTrue:[
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   856
        ^cls helpSpecClass
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   857
    ].
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   858
    ^cls
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   859
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   860
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   861
!
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   862
761
91e524583390 do not save, if help texts have not changed (unformatting)
tz
parents: 750
diff changeset
   863
getUnformattedHelpText: aHelpText
91e524583390 do not save, if help texts have not changed (unformatting)
tz
parents: 750
diff changeset
   864
    "unformats aHelpText and returns it"
91e524583390 do not save, if help texts have not changed (unformatting)
tz
parents: 750
diff changeset
   865
91e524583390 do not save, if help texts have not changed (unformatting)
tz
parents: 750
diff changeset
   866
    |helpText|
896
0e732b716759 use #copyReplaceAll:with:
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
   867
0e732b716759 use #copyReplaceAll:with:
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
   868
    helpText := aHelpText asString copyReplaceAll:(Character cr) with:(Character space).
0e732b716759 use #copyReplaceAll:with:
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
   869
    (helpText endsWith:(Character space)) ifTrue:[
761
91e524583390 do not save, if help texts have not changed (unformatting)
tz
parents: 750
diff changeset
   870
        helpText := helpText copyWithoutLast:1
91e524583390 do not save, if help texts have not changed (unformatting)
tz
parents: 750
diff changeset
   871
    ].
896
0e732b716759 use #copyReplaceAll:with:
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
   872
    ^ helpText
0e732b716759 use #copyReplaceAll:with:
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
   873
0e732b716759 use #copyReplaceAll:with:
Claus Gittinger <cg@exept.de>
parents: 891
diff changeset
   874
    "Modified: / 20.7.1998 / 13:17:52 / cg"
761
91e524583390 do not save, if help texts have not changed (unformatting)
tz
parents: 750
diff changeset
   875
!
91e524583390 do not save, if help texts have not changed (unformatting)
tz
parents: 750
diff changeset
   876
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   877
installHelpSpecOnClass:aClass
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   878
    "saves the help dicts in aClass which is subclass of ApplicationModel"
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   879
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   880
    |cls src helpSpec|
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   881
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   882
    cls := self getHelpSpecClassFromClass: aClass.
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   883
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   884
    cls isNil ifTrue:[
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   885
        self information:'No application class defined!!'.
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   886
        ^nil
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   887
    ].
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   888
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   889
    (cls isSubclassOf: ApplicationModel) ifFalse:[
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   890
        self information: 'Cannot save help spec into class ', cls name asBoldText, ',\because it is not a subclass of ApplicationModel!!' withCRs.
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   891
        ^nil
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   892
    ].
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   893
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   894
    helpSpec := dictionaries 
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   895
        at: cls name 
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   896
        ifAbsent: [specClass notNil 
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   897
            ifTrue:  [dictionaries at: aClass put: (self extractHelpSpecForClass: (Smalltalk at: aClass))]
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   898
            ifFalse: [dictionary size > 0 ifTrue: [dictionary] ifFalse: [Dictionary new]]].
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   899
761
91e524583390 do not save, if help texts have not changed (unformatting)
tz
parents: 750
diff changeset
   900
    helpSpec associationsDo:
91e524583390 do not save, if help texts have not changed (unformatting)
tz
parents: 750
diff changeset
   901
    [:h|
91e524583390 do not save, if help texts have not changed (unformatting)
tz
parents: 750
diff changeset
   902
        helpSpec at: h key put: (self getUnformattedHelpText: h value)
91e524583390 do not save, if help texts have not changed (unformatting)
tz
parents: 750
diff changeset
   903
    ].
91e524583390 do not save, if help texts have not changed (unformatting)
tz
parents: 750
diff changeset
   904
1554
d5e4612bf7cf implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents: 1506
diff changeset
   905
    (cls class includesSelector: specSelector) 
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   906
    ifTrue: 
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   907
    [
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   908
        |superclassHelpKeys implementedHelpSpec hasChanged|
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   909
        implementedHelpSpec := Dictionary new.
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   910
        superclassHelpKeys := (cls superclass respondsTo: specSelector)
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   911
            ifTrue:  [cls superclass helpSpec keys]
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   912
            ifFalse: [Array new].
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   913
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   914
        cls helpSpec associationsDo: [:h| (superclassHelpKeys includes: h key) 
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   915
            ifFalse: [implementedHelpSpec at: h key put: h value]].
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   916
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   917
        hasChanged := false.
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   918
        implementedHelpSpec associationsDo: [:h| (helpSpec            includesAssociation: h) ifFalse: [hasChanged := true]].
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   919
        helpSpec            associationsDo: [:h| (implementedHelpSpec includesAssociation: h) ifFalse: [hasChanged := true]].
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   920
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   921
        (implementedHelpSpec notEmpty and: [hasChanged and:
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   922
        [DialogBox confirm: 'Class ', cls name asBoldText, ' already implements\a help spec!!\\Do only replace, if you have removed\help keys in an existing help spec.\' withCRs yesLabel: ' Merge ' noLabel: ' Replace ']])
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   923
        ifTrue:
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   924
        [      
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   925
             implementedHelpSpec associationsDo: [:h| (helpSpec includesKey: h key) 
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   926
                ifFalse: [helpSpec at: h key put: h value]].
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   927
        ]
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   928
    ].
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   929
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   930
    helpSpec isEmpty ifTrue:[
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   931
        ^(cls superclass respondsTo: specSelector) ifTrue: [cls class removeSelector: specSelector].
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   932
    ].
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   933
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   934
    src  := '' writeStream.
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   935
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   936
    src nextPutAll:
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   937
        specSelector, '\' withCRs,
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   938
        (ResourceSpecEditor codeGenerationCommentForClass: UIHelpTool) withCRs,
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   939
    '\\' withCRs,
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   940
    '    "\' withCRs,
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   941
    '     UIHelpTool openOnClass:', cls name asString ,'    
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   942
    "
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   943
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   944
    <resource: #help>
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   945
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   946
    ^super ', specSelector, ' addPairsFrom:#(
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   947
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   948
'.
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   949
761
91e524583390 do not save, if help texts have not changed (unformatting)
tz
parents: 750
diff changeset
   950
    helpSpec keys asSortedCollection do:
91e524583390 do not save, if help texts have not changed (unformatting)
tz
parents: 750
diff changeset
   951
    [:key|
91e524583390 do not save, if help texts have not changed (unformatting)
tz
parents: 750
diff changeset
   952
        src nextPutLine: key storeString.
91e524583390 do not save, if help texts have not changed (unformatting)
tz
parents: 750
diff changeset
   953
        src nextPutLine: (helpSpec at: key) storeString; cr.
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   954
    ].
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   955
    src nextPutLine:')'.
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   956
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   957
    Compiler 
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   958
        compile:(src contents)
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   959
        forClass:cls class 
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   960
        inCategory:'help specs'.
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   961
!
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   962
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   963
installHelpSpecsOnClass:aClass
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   964
    "saves the help dicts on aClass and its superclasses which are subclasses of ApplicationModel"
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   965
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   966
    |cls helpSpecClasses|
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   967
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   968
    cls := self getHelpSpecClassFromClass:aClass.
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   969
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   970
    cls isNil ifTrue: [
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   971
        self information:'No application class defined!!'.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   972
        ^ self  
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   973
    ].
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   974
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   975
    modified ifFalse:[
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   976
        masterApplication isNil ifTrue: [self information:'Nothing was modified!!'].
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   977
        ^ self
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   978
    ].
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   979
    helpSpecClasses := listOfClasses copy.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   980
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   981
    helpSpecClasses notEmpty ifTrue:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   982
        (helpSpecClasses includes: cls name) ifFalse: [helpSpecClasses add: cls name].
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   983
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   984
        helpSpecClasses do:[:clsName|
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   985
            (self installHelpSpecOnClass: clsName) isNil ifTrue:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   986
                modified := false.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   987
                ^ self
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   988
            ]
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   989
        ].
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   990
    ]
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   991
    ifFalse:
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   992
    [      
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   993
        self installHelpSpecOnClass: cls
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   994
    ].
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   995
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   996
    modified := false.
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   997
!
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   998
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   999
resourceMessage: aString
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1000
    "extracts from aString the specClass and the specSelector"
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1001
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1002
    (aString notNil and: [self askForModification]) 
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1003
    ifTrue:
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1004
    [            
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1005
        |msg cls sel|
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1006
        msg := aString asCollectionOfWords.
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1007
        (msg size == 2 and:
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1008
        [(cls := self resolveName:(msg at:1)) notNil])
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1009
        ifTrue:
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1010
        [
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1011
            specClass := cls name.
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1012
            specSelector := (msg at: 2) asSymbol.
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1013
            ^true
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1014
        ]
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1015
    ].
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1016
    ^false
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1017
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1018
!
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1019
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
  1020
updateList
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1021
    "updates the list of keys
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1022
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1023
    |key|
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
  1024
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1025
    listOfKeysModel setValue:nil.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1026
    listOfKeys contents:(dictionary keys asSortedCollection).
1243
03c4a3e4ddd2 bug fix
ca
parents: 1198
diff changeset
  1027
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1028
    key := self helpKey.
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
  1029
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1030
    (key notNil and:[listOfKeys includes:key]) ifFalse:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1031
        key := nil.
1243
03c4a3e4ddd2 bug fix
ca
parents: 1198
diff changeset
  1032
    ].
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1033
    listOfKeysModel triggerValue:key
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
  1034
! !
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
  1035
369
9d34f1ff4d29 support of lineFeed charaters
ca
parents: 354
diff changeset
  1036
!UIHelpTool methodsFor:'startup / release'!
9d34f1ff4d29 support of lineFeed charaters
ca
parents: 354
diff changeset
  1037
9d34f1ff4d29 support of lineFeed charaters
ca
parents: 354
diff changeset
  1038
closeRequest
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1039
    "asks for permission before closing"
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1040
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
  1041
    (self masterApplication isNil and:[self askForModification]) ifTrue:[
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
  1042
        super closeRequest
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
  1043
    ]
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
  1044
!
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
  1045
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
  1046
initialize
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1047
    "initializes instance variables"
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1048
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
  1049
    super initialize.
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
  1050
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1051
    specSelector := #helpSpec.
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
  1052
    dictionary   := Dictionary new.
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
  1053
    dictionaries := Dictionary new.
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1054
    modified     := false.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1055
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1056
    editModel := nil asValue.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1057
    editModel addDependent:self.
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
  1058
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1059
    listOfKeys   := List new.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1060
    listOfKeysModel := nil asValue.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1061
    listOfKeysModel addDependent:self.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1062
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1063
    listOfClasses := List new.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1064
    listOfClassesModel := nil asValue.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1065
    listOfClassesModel addDependent:self.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1066
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1067
    contentsModifiedChannel := false asValue.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1068
    contentsModifiedChannel addDependent:self.
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
  1069
!
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
  1070
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1071
loadFromMessage:aString
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1072
    "loads a help spec by evaluating aString"
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1073
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1074
    (aString notNil and: [self askForModification]) 
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1075
    ifTrue:
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1076
    [            
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1077
        |msg cls sel|
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1078
        msg := aString asCollectionOfWords.
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1079
        (msg size == 2 and:
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1080
        [(cls := self resolveName:(msg at:1)) notNil and:
1554
d5e4612bf7cf implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents: 1506
diff changeset
  1081
        [cls class includesSelector: (sel := (msg at: 2) asSymbol)]])
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1082
        ifTrue:
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1083
        [               
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1084
            self buildFromClass: (specClass := cls name) andSelector: (specSelector := sel).
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1085
            ^true
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1086
        ]
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1087
    ].
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1088
    ^false
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1089
!
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1090
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
  1091
openInterface:aSymbol
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1092
    "do not open as stand alone"
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1093
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1094
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1095
   
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1096
!
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1097
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1098
openOnClass:aClass
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1099
    "opens the UIHelpTool on aClass"
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1100
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1554
diff changeset
  1101
    self openOnClass:aClass andSelector:nil
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1554
diff changeset
  1102
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1554
diff changeset
  1103
    "
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1554
diff changeset
  1104
     self openOnClass:NewLauncher
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1554
diff changeset
  1105
    "
940
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
  1106
!
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
  1107
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
  1108
openOnClass:aClass andSelector: aSelector
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
  1109
    "opens the UIHelpTool on aClass and aSelector"
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
  1110
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
  1111
    super openInterface: #windowSpecForStandAlone.
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1554
diff changeset
  1112
940
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
  1113
    builder window label: 'Help Tool'.
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1554
diff changeset
  1114
    self buildFromClass:aClass andSelector:aSelector
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1115
!
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1116
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1117
postBuildTextView:aView
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1118
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1119
    editTextView := aView scrolledView.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1120
    editTextView acceptAction:[:dummy| self accept ].
369
9d34f1ff4d29 support of lineFeed charaters
ca
parents: 354
diff changeset
  1121
! !
9d34f1ff4d29 support of lineFeed charaters
ca
parents: 354
diff changeset
  1122
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
  1123
!UIHelpTool methodsFor:'user actions'!
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
  1124
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1125
accept
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1126
    "accepts the help text"
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1127
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1128
    |key txt|   
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1129
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1130
    contentsModifiedChannel value ifFalse:[^ self].
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1131
    contentsModifiedChannel value:false.
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1132
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1133
    key := self helpKey.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1134
    key isNil ifTrue:[^ self].
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1135
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1136
    txt := editTextView contents ? ''.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1137
    txt := txt asString.
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1138
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1139
    dictionary at:key put:txt.
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1140
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1141
    listOfKeys detect:[:el| el = key ] ifNone:[ |idx|
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1142
        idx := listOfKeys findFirst:[:el| el > key ].
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1143
        idx == 0 ifTrue:[ listOfKeys add:key ]
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1144
                ifFalse:[ listOfKeys add:key beforeIndex:idx]
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1145
    ].
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1146
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1147
    listOfKeysModel value:key withoutNotifying:self.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1148
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1149
    modified := true.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1150
    modifiedHolder notNil ifTrue:[ modifiedHolder value:true ].
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1151
!
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1152
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1153
cancel
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1154
    |key txt|
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1155
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1156
    editTextView notNil ifTrue:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1157
        key := listOfKeysModel value.
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1158
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1159
        key notNil ifTrue:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1160
            txt := dictionary at:key ifAbsent:nil.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1161
        ] ifFalse:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1162
            txt := nil
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1163
        ].
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1164
        editTextView contents:txt.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1165
    ].
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1166
    contentsModifiedChannel value:false.
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1167
!
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1168
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1169
doDelete
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1170
    "deletes the selected help key
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1171
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1172
    |key|
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1173
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1174
    key := listOfKeysModel value.
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1175
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1176
    key isNil ifTrue:[
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1177
        self warn:'No key selected !!'.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1178
        ^ self
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1179
    ].
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1180
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1181
    listOfKeysModel value:nil.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1182
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1183
    key := key asSymbol.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1184
    listOfKeys remove:key ifAbsent:nil.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1185
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1186
    (dictionary removeKey:key ifAbsent:nil) notNil ifTrue:[
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
  1187
        modified := true.
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1188
        modifiedHolder notNil ifTrue: [modifiedHolder value:true].
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1189
    ].
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1190
!
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1191
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1192
doLoad
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1193
    "opens a Resource Selection Browser in order to get a resource message"
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
  1194
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1195
    self loadFromMessage: 
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1196
        (ResourceSelectionBrowser
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1197
            request: 'Load Help Spec From Class'
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1198
            onSuperclass: nil
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1199
            andClass: specClass
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1200
            andSelector: specSelector ? #help
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1201
            withResourceTypes: (Array with: #help)).
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1202
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1203
    self updateInfoLabel
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
  1204
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1205
!
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
  1206
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1207
doNew
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1208
    "resets the help tool"
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1209
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1210
    specClass := nil.
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
  1211
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1212
    editModel          value:nil withoutNotifying:self.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1213
    listOfKeysModel    value:nil.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1214
    listOfClassesModel value:nil.
369
9d34f1ff4d29 support of lineFeed charaters
ca
parents: 354
diff changeset
  1215
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1216
    listOfKeys    removeAll.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1217
    listOfClasses removeAll.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1218
    dictionaries  removeAll.
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1219
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1220
    dictionary   := Dictionary new.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1221
    modified     := false.
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1222
!
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1223
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1224
doSave
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1225
    "saves the help dictionaries on specClass"
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1226
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1227
    self installHelpSpecsOnClass:specClass
148
785417b6955d intitial checkin
ca
parents:
diff changeset
  1228
! !
785417b6955d intitial checkin
ca
parents:
diff changeset
  1229
785417b6955d intitial checkin
ca
parents:
diff changeset
  1230
!UIHelpTool class methodsFor:'documentation'!
785417b6955d intitial checkin
ca
parents:
diff changeset
  1231
785417b6955d intitial checkin
ca
parents:
diff changeset
  1232
version
785417b6955d intitial checkin
ca
parents:
diff changeset
  1233
    ^ '$Header$'
785417b6955d intitial checkin
ca
parents:
diff changeset
  1234
! !