UIHelpTool.st
author ca
Thu, 09 Jan 2003 09:21:55 +0100
changeset 1670 72af7609bb08
parent 1669 e6ea33c843a0
child 1681 7a8e5df3f07d
permissions -rw-r--r--
*** empty log message ***
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
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
     3
	      All Rights Reserved
156
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
1554
d5e4612bf7cf implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents: 1506
diff changeset
    13
"{ Package: 'stx:libtool2' }"
d5e4612bf7cf implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents: 1506
diff changeset
    14
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
    15
ToolApplicationModel subclass:#UIHelpTool
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    16
	instanceVariableNames:'specClass specSelector classItemList classItemModel keyItemModel
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    17
		helpTextView modifiedHolder contentsModifiedChannel editModel'
148
785417b6955d intitial checkin
ca
parents:
diff changeset
    18
	classVariableNames:''
785417b6955d intitial checkin
ca
parents:
diff changeset
    19
	poolDictionaries:''
785417b6955d intitial checkin
ca
parents:
diff changeset
    20
	category:'Interface-UIPainter'
785417b6955d intitial checkin
ca
parents:
diff changeset
    21
!
785417b6955d intitial checkin
ca
parents:
diff changeset
    22
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    23
HierarchicalItem subclass:#ClassItem
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    24
	instanceVariableNames:'theClass list modified'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    25
	classVariableNames:''
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    26
	poolDictionaries:''
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    27
	privateIn:UIHelpTool
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    28
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    29
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    30
HierarchicalItem subclass:#KeyItem
1670
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
    31
	instanceVariableNames:'helpKey helpText modified icon'
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    32
	classVariableNames:''
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    33
	poolDictionaries:''
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    34
	privateIn:UIHelpTool
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    35
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    36
148
785417b6955d intitial checkin
ca
parents:
diff changeset
    37
!UIHelpTool class methodsFor:'documentation'!
785417b6955d intitial checkin
ca
parents:
diff changeset
    38
156
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    39
copyright
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
 COPYRIGHT (c) 1995 by eXept Software AG
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    42
	      All Rights Reserved
156
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    43
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    44
 This software is furnished under a license and may be used
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    45
 only in accordance with the terms of that license and with the
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    46
 inclusion of the above copyright notice.   This software may not
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    47
 be provided or otherwise made available to, or used by, any
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    48
 other person.  No title to or ownership of the software is
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    49
 hereby transferred.
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    50
"
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    51
!
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    52
148
785417b6955d intitial checkin
ca
parents:
diff changeset
    53
documentation
785417b6955d intitial checkin
ca
parents:
diff changeset
    54
"
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
    55
    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
    56
    window applications. The tool are able to run stand alone or in other master 
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
    57
    applications like the GUI Painter and the Menu Editor.
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
    58
    If the application responds to the selector #showHelp:aHelpText for:aView,
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
    59
    this selector is called by the widget's view when the mouse cursor moves over. 
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
    60
    If the application does not responds to that selector, and the activeHelp mode
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
    61
    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
    62
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
    63
    [instance variables:]
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    64
	specClass       <Symbol>        class implementing the help spec
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    65
	specSelector    <Symbol>        selector returning the help spec
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    66
	classItemList                   the list of classItems
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    67
	classItemModel                  keeps the selected class
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    68
	keyItemModel                    keeps the selected helpKey
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    69
	modifiedHolder  <ValueHolder>   true if the editField or contents changed
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    70
	editModel                       keeps the current helpKey
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    71
	helpTextView                    the view which shows the helpText
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    72
	contentsModifiedChannel         true if the helpText is modified
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
    73
156
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    74
    [author:]
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    75
	Claus Atzkern, eXept Software AG
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    76
	Thomas Zwick,  eXept Software AG
148
785417b6955d intitial checkin
ca
parents:
diff changeset
    77
"
785417b6955d intitial checkin
ca
parents:
diff changeset
    78
! !
785417b6955d intitial checkin
ca
parents:
diff changeset
    79
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
    80
!UIHelpTool class methodsFor:'instance creation'!
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
    81
832
2c5b61b168e8 allow #open (its in the docu !)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
    82
open
833
ff2f237a309a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
    83
    ^ self openOnClass:nil.
832
2c5b61b168e8 allow #open (its in the docu !)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
    84
!
2c5b61b168e8 allow #open (its in the docu !)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
    85
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
    86
openOnClass:aClass
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    87
    "opens a Help Tool on aClass
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
    88
    "
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    89
    ^ self openOnClass:aClass andSelector:#helpSpec
940
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
    90
!
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
    91
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
    92
openOnClass:aClass andSelector: aSelector
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    93
    "opens a Help Tool on aClass and aSelector
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    94
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    95
    ^ self new openOnClass:aClass andSelector:aSelector
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
    96
! !
9b705e31d38e some cleans
tz
parents: 740
diff changeset
    97
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
    98
!UIHelpTool class methodsFor:'constants'!
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
    99
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   100
label
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   101
    "returns the label; used if embedded as sub canvas in the GUI Painter or Menu Editor
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   102
    "
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   103
    ^'Help'
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   104
! !
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   105
151
ca
parents: 148
diff changeset
   106
!UIHelpTool class methodsFor:'help specs'!
ca
parents: 148
diff changeset
   107
ca
parents: 148
diff changeset
   108
helpSpec
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   109
    "This resource specification was automatically generated
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   110
     by the UIHelpTool of ST/X."
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   111
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   112
    "Do not manually edit this!! If it is corrupted,
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   113
     the UIHelpTool may not be able to read the specification."
292
af69e3e025a9 an empty selection is specified by 0
ca
parents: 286
diff changeset
   114
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 156
diff changeset
   115
    "
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   116
     UIHelpTool openOnClass:UIHelpTool    
292
af69e3e025a9 an empty selection is specified by 0
ca
parents: 286
diff changeset
   117
    "
af69e3e025a9 an empty selection is specified by 0
ca
parents: 286
diff changeset
   118
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   119
    <resource: #help>
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   120
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   121
    ^ super helpSpec addPairsFrom:#(
151
ca
parents: 148
diff changeset
   122
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   123
#addHelpTextKey
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   124
'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
   125
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   126
#currentHelpTexts
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   127
'Selected help text key.'
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   128
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   129
#deleteHelpTextKey
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   130
'Deletes the key from the help spec.'
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   131
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   132
#fileLoad
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   133
'Opens a dialog for selecting and loading a help spec from a class.'
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   134
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   135
#fileSave
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   136
'Saves the current help spec.'
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   137
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   138
#fileUpdate
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   139
'Reload the help spec.'
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   140
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   141
#helpTextView
1622
766547778a34 Help strings
Stefan Vogel <sv@exept.de>
parents: 1620
diff changeset
   142
'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
   143
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   144
#listOfClasses
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   145
'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
   146
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   147
#listOfHelpTexts
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   148
'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
   149
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   150
#removeHelpTextKey
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   151
'Removes the help message from the widget.'
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 156
diff changeset
   152
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   153
#updateHelpTextKey
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   154
'Refetch the help spec.'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   155
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 156
diff changeset
   156
)
151
ca
parents: 148
diff changeset
   157
! !
ca
parents: 148
diff changeset
   158
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   159
!UIHelpTool class methodsFor:'interface specs'!
785417b6955d intitial checkin
ca
parents:
diff changeset
   160
785417b6955d intitial checkin
ca
parents:
diff changeset
   161
windowSpec
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   162
    "This resource specification was automatically generated
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   163
     by the UIPainter of ST/X."
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   164
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   165
    "Do not manually edit this!! If it is corrupted,
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   166
     the UIPainter may not be able to read the specification."
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   167
785417b6955d intitial checkin
ca
parents:
diff changeset
   168
    "
151
ca
parents: 148
diff changeset
   169
     UIPainter new openOnClass:UIHelpTool andSelector:#windowSpec
ca
parents: 148
diff changeset
   170
     UIHelpTool new openInterface:#windowSpec
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   171
     UIHelpTool open
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   172
    "
785417b6955d intitial checkin
ca
parents:
diff changeset
   173
785417b6955d intitial checkin
ca
parents:
diff changeset
   174
    <resource: #canvas>
785417b6955d intitial checkin
ca
parents:
diff changeset
   175
1302
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   176
    ^ 
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   177
     #(#FullSpec
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   178
	#name: #windowSpec
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   179
	#window: 
1302
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   180
       #(#WindowSpec
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   181
	  #label: 'UIHelpTool'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   182
	  #name: 'UIHelpTool'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   183
	  #min: #(#Point 10 10)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   184
	  #max: #(#Point 1024 768)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   185
	  #bounds: #(#Rectangle 30 292 491 585)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   186
	)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   187
	#component: 
1302
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   188
       #(#SpecCollection
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   189
	  #collection: #(
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   190
	   #(#VariableVerticalPanelSpec
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   191
	      #name: 'PanelVrt'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   192
	      #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   193
	      #component: 
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   194
	     #(#SpecCollection
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   195
		#collection: #(
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   196
		 #(#VariableHorizontalPanelSpec
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   197
		    #name: 'PanelHrz'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   198
		    #component: 
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   199
		   #(#SpecCollection
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   200
		      #collection: #(
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   201
		       #(#HierarchicalListViewSpec
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   202
			  #name: 'keyItemModel'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   203
			  #model: #keyItemModel
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   204
			  #menu: #keyItemMenu
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   205
			  #hasHorizontalScrollBar: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   206
			  #hasVerticalScrollBar: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   207
			  #miniScrollerHorizontal: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   208
			  #miniScrollerVertical: false
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   209
			  #listModel: #keyItemListHolder
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   210
			  #useIndex: false
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   211
			  #highlightMode: #label
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   212
			  #showLines: false
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   213
			  #showIndicators: false
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   214
			  #showLeftIndicators: false
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   215
			  #useDefaultIcons: false
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   216
			  #autoScrollHorizontal: false
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   217
			)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   218
		       #(#ViewSpec
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   219
			  #name: 'classItemList'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   220
			  #component: 
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   221
			 #(#SpecCollection
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   222
			    #collection: #(
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   223
			     #(#InputFieldSpec
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   224
				#name: 'editModel'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   225
				#layout: #(#LayoutFrame 0 0.0 2 0 -1 1.0 25 0)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   226
				#activeHelpKey: #currentHelpTexts
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   227
				#model: #editModel
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   228
				#immediateAccept: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   229
				#acceptOnReturn: false
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   230
				#acceptOnTab: false
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   231
				#acceptOnLostFocus: false
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   232
				#acceptOnPointerLeave: false
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   233
			      )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   234
			     #(#SelectionInListModelViewSpec
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   235
				#name: 'classItemModel'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   236
				#layout: #(#LayoutFrame 0 0.0 27 0.0 0 1.0 0 1.0)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   237
				#model: #classItemModel
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   238
				#hasHorizontalScrollBar: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   239
				#hasVerticalScrollBar: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   240
				#miniScrollerHorizontal: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   241
				#miniScrollerVertical: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   242
				#autoHideScrollBars: false
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   243
				#listModel: #classItemListHolder
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   244
				#useIndex: false
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   245
				#highlightMode: #label
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   246
			      )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   247
			     )
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   248
                           
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   249
			  )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   250
			)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   251
		       )
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   252
                     
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   253
		    )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   254
		    #handles: #(#Any 0.607375 1.0)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   255
		  )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   256
		 #(#ArbitraryComponentSpec
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   257
		    #name: 'helpTextView'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   258
		    #hasHorizontalScrollBar: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   259
		    #hasVerticalScrollBar: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   260
		    #miniScrollerHorizontal: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   261
		    #miniScrollerVertical: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   262
		    #hasBorder: false
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   263
		    #component: #helpTextView
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   264
		  )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   265
		 )
1302
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   266
               
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   267
	      )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   268
	      #handles: #(#Any 0.679181 1.0)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   269
	    )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   270
	   )
1302
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   271
         
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   272
	)
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   273
      )
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   274
!
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   275
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   276
windowSpecForStandAlone
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   277
    "This resource specification was automatically generated
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   278
     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
   279
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   280
    "Do not manually edit this!! If it is corrupted,
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   281
     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
   282
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   283
    "
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   284
     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
   285
     UIHelpTool new openInterface:#windowSpecForStandAlone
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   286
    "
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   287
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   288
    <resource: #canvas>
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   289
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   290
    ^ 
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   291
     #(#FullSpec
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   292
	#name: #windowSpecForStandAlone
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   293
	#window: 
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   294
       #(#WindowSpec
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   295
	  #label: 'Help Tool'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   296
	  #name: 'Help Tool'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   297
	  #min: #(#Point 300 300)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   298
	  #max: #(#Point 1152 900)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   299
	  #bounds: #(#Rectangle 11 332 509 761)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   300
	  #menu: #menu
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   301
	)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   302
	#component: 
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   303
       #(#SpecCollection
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   304
	  #collection: #(
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   305
	   #(#UISubSpecification
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   306
	      #name: 'windowSpec'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   307
	      #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -50 1.0)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   308
	      #minorKey: #windowSpec
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   309
	    )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   310
	   #(#UISubSpecification
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   311
	      #name: 'windowSpecForCommit'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   312
	      #layout: #(#LayoutFrame 0 0.0 -50 1.0 0 1.0 -24 1.0)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   313
	      #majorKey: #ToolApplicationModel
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   314
	      #minorKey: #windowSpecForCommit
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   315
	    )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   316
	   #(#UISubSpecification
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   317
	      #name: 'windowSpecForInfoBar'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   318
	      #layout: #(#LayoutFrame 0 0 -24 1 0 1 0 1)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   319
	      #majorKey: #ToolApplicationModel
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   320
	      #minorKey: #windowSpecForInfoBar
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   321
	    )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   322
	   )
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   323
         
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   324
	)
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   325
      )
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   326
! !
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   327
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   328
!UIHelpTool class methodsFor:'menu specs'!
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   329
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   330
helpTextMenu
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   331
    "This resource specification was automatically generated
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   332
     by the MenuEditor of ST/X."
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   333
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   334
    "Do not manually edit this!! If it is corrupted,
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   335
     the MenuEditor may not be able to read the specification."
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   336
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   337
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   338
     MenuEditor new openOnClass:UIHelpTool andSelector:#helpTextMenu
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   339
     (Menu new fromLiteralArrayEncoding:(UIHelpTool helpTextMenu)) startUp
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   340
    "
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
    <resource: #menu>
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
    ^ 
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   345
     #(#Menu
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   346
	#(
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   347
	 #(#MenuItem
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   348
	    #activeHelpKey: #commitOK
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   349
	    #enabled: #contentsModifiedChannel
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   350
	    #label: 'Accept'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   351
	    #itemValue: #accept
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   352
	    #translateLabel: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   353
	  )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   354
	 #(#MenuItem
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   355
	    #activeHelpKey: #commitCancel
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   356
	    #enabled: #contentsModifiedChannel
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   357
	    #label: 'Cancel'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   358
	    #itemValue: #cancel
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   359
	    #translateLabel: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   360
	  )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   361
	 )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   362
	nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   363
	nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   364
      )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   365
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   366
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   367
keyItemMenu
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   368
    "This resource specification was automatically generated
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   369
     by the MenuEditor of ST/X."
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   370
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   371
    "Do not manually edit this!! If it is corrupted,
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   372
     the MenuEditor may not be able to read the specification."
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   373
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   374
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   375
     MenuEditor new openOnClass:UIHelpTool andSelector:#keyItemMenu
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   376
     (Menu new fromLiteralArrayEncoding:(UIHelpTool keyItemMenu)) startUp
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   377
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   378
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   379
    <resource: #menu>
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   380
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   381
    ^ 
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   382
     #(#Menu
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   383
	#(
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   384
	 #(#MenuItem
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   385
	    #activeHelpKey: #deleteHelpTextKey
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   386
	    #label: 'Delete'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   387
	    #itemValue: #doDelete
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   388
	    #translateLabel: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   389
	  )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   390
	 )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   391
	nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   392
	nil
1646
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
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   396
listOfKeysMenu
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   397
    "This resource specification was automatically generated
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   398
     by the MenuEditor of ST/X."
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   399
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   400
    "Do not manually edit this!! If it is corrupted,
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   401
     the MenuEditor may not be able to read the specification."
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   402
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
     MenuEditor new openOnClass:UIHelpTool andSelector:#listOfKeysMenu
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   405
     (Menu new fromLiteralArrayEncoding:(UIHelpTool listOfKeysMenu)) startUp
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   406
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   407
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   408
    <resource: #menu>
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
     #(#Menu
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   412
	#(
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   413
	 #(#MenuItem
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   414
	    #activeHelpKey: #deleteHelpTextKey
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   415
	    #label: 'Delete'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   416
	    #itemValue: #doDelete
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   417
	    #translateLabel: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   418
	  )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   419
	 )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   420
	nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   421
	nil
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   422
      )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   423
!
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   424
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   425
menu
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   426
    "This resource specification was automatically generated
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   427
     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
   428
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   429
    "Do not manually edit this!! If it is corrupted,
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   430
     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
   431
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   432
    "
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   433
     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
   434
     (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
   435
    "
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   436
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   437
    <resource: #menu>
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   438
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   439
    ^ 
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   440
     #(#Menu
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   441
	#(
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   442
	 #(#MenuItem
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   443
	    #label: 'File'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   444
	    #translateLabel: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   445
	    #submenu: 
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   446
	   #(#Menu
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   447
	      #(
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   448
	       #(#MenuItem
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   449
		  #activeHelpKey: #fileLoad
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   450
		  #label: 'Load...'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   451
		  #itemValue: #doLoad
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   452
		  #translateLabel: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   453
		)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   454
	       #(#MenuItem
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   455
		  #activeHelpKey: #fileSave
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   456
		  #label: 'Save'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   457
		  #itemValue: #doSave
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   458
		  #translateLabel: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   459
		)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   460
	       #(#MenuItem
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   461
		  #label: 'New'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   462
		  #itemValue: #doNew
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   463
		  #translateLabel: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   464
		)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   465
	       #(#MenuItem
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   466
		  #label: '-'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   467
		)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   468
	       #(#MenuItem
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   469
		  #activeHelpKey: #fileExit
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   470
		  #label: 'Exit'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   471
		  #itemValue: #closeRequest
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   472
		  #translateLabel: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   473
		)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   474
	       )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   475
	      nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   476
	      nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   477
	    )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   478
	  )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   479
	 #(#MenuItem
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   480
	    #activeHelpKey: #history
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   481
	    #label: 'History'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   482
	    #translateLabel: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   483
	    #submenuChannel: #menuHistory
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   484
	  )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   485
	 #(#MenuItem
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   486
	    #label: 'Edit'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   487
	    #translateLabel: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   488
	    #submenuChannel: #keyItemMenu
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   489
	    #keepLinkedMenu: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   490
	  )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   491
	 #(#MenuItem
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   492
	    #activeHelpKey: #help
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   493
	    #label: 'Help'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   494
	    #translateLabel: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   495
	    #startGroup: #right
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   496
	    #submenuChannel: #menuHelp
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   497
	  )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   498
	 )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   499
	nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   500
	nil
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   501
      )
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   502
! !
785417b6955d intitial checkin
ca
parents:
diff changeset
   503
785417b6955d intitial checkin
ca
parents:
diff changeset
   504
!UIHelpTool methodsFor:'accessing'!
785417b6955d intitial checkin
ca
parents:
diff changeset
   505
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   506
helpKey
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   507
    "returns the helpKey as symbol or nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   508
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   509
    |key|
710
8c968790c885 use same help dict if started from the gui painter
tz
parents: 704
diff changeset
   510
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   511
    key := editModel value.
151
ca
parents: 148
diff changeset
   512
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   513
    key size ~~ 0 ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   514
	key := key withoutSeparators.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   515
	key notEmpty ifTrue:[ ^ key asSymbol ]
151
ca
parents: 148
diff changeset
   516
    ].
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   517
    ^ nil
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   518
!
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   519
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   520
helpKey:aKey
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   521
    "change the helpKey without any change notification (modifiedHolder).
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   522
    "
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   523
    |key|
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   524
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   525
    self withoutModifyDo:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   526
	aKey size ~~ 0 ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   527
	    key := aKey withoutSeparators.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   528
	    key isEmpty ifTrue:[ key := nil ]
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   529
	] ifFalse:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   530
	    key := nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   531
	].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   532
	editModel value:key.
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   533
    ].
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   534
    self cancel.
151
ca
parents: 148
diff changeset
   535
!
ca
parents: 148
diff changeset
   536
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   537
modified
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   538
    "true if any items are added, deleted or modified
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   539
    "
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   540
    classItemList do:[:aClassItem|
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   541
	aClassItem modified ifTrue:[^ true].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   542
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   543
    ^ false
700
2aae4f3b6526 supports merging into existing help specs
tz
parents: 696
diff changeset
   544
!
2aae4f3b6526 supports merging into existing help specs
tz
parents: 696
diff changeset
   545
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   546
modified:aBoolean
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   547
    "true if any items are added, deleted or modified
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   548
    "
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   549
    classItemList do:[:aClassItem| aClassItem modified:aBoolean ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   550
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   551
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   552
modifiedHolder
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   553
    "boolean holder which is set to true if the helpKey or contents changed
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   554
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   555
    ^ modifiedHolder
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
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   558
modifiedHolder:aValueHolder
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   559
    "boolean holder which is set to true if the helpKey or contents changed
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   560
    "
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   561
    modifiedHolder notNil ifTrue:[
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   562
	modifiedHolder removeDependent:self. 
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   563
    ].
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   564
    modifiedHolder := aValueHolder.
459
fb5b5ecf7e86 set modified if help text has changed
tz
parents: 456
diff changeset
   565
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   566
    modifiedHolder notNil ifTrue:[
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   567
	modifiedHolder addDependent:self.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   568
    ].
1604
69dc29cf0fc5 *** empty log message ***
ca
parents: 1597
diff changeset
   569
!
69dc29cf0fc5 *** empty log message ***
ca
parents: 1597
diff changeset
   570
715
7eebac822985 modified bug fixed
tz
parents: 710
diff changeset
   571
specClass
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   572
    "returns the class on which the help tool works on
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   573
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   574
    ^ specClass
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   575
!
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   576
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   577
specSelector
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   578
    "returns the selector on which the class is opened
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   579
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   580
    ^ specSelector
354
a6de8821d3bf add & remove popUpMenu
Claus Gittinger <cg@exept.de>
parents: 339
diff changeset
   581
! !
a6de8821d3bf add & remove popUpMenu
Claus Gittinger <cg@exept.de>
parents: 339
diff changeset
   582
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   583
!UIHelpTool methodsFor:'aspects'!
785417b6955d intitial checkin
ca
parents:
diff changeset
   584
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   585
classItemListHolder
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   586
    "returns the holder which keeps the class items
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   587
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   588
    |holder|
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   589
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   590
    holder := builder bindingAt:#classItemListHolder.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   591
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   592
    holder isNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   593
	holder := nil asValue.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   594
	holder value:classItemList.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   595
	builder aspectAt:#classItemListHolder put:holder.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   596
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   597
    ^ holder
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   598
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   599
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   600
classItemModel
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   601
    "returns the holder which keeps the current selected class
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   602
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   603
    ^ classItemModel
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   604
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   605
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   606
contentsModifiedChannel
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   607
    "boolean holder, which is set to true if the contents assigned to the
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   608
     helpKey changed
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   609
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   610
    ^ contentsModifiedChannel
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   611
!
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   612
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   613
editModel
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   614
    "string holder, which keeps the current editing helpKey as string
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   615
    "
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   616
    ^ editModel.
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   617
!
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   618
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   619
helpTextView
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   620
    "the editView which keeps the current help contents assigned to the key
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   621
    "
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   622
    ^ helpTextView
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   623
!
785417b6955d intitial checkin
ca
parents:
diff changeset
   624
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   625
keyItemListHolder
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   626
    "holder, which keeps the current hierarchical list
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   627
     assigned to the selected class item
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   628
    "
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   629
    |holder|
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   630
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   631
    holder := builder bindingAt:#keyItemListHolder.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   632
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   633
    holder isNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   634
	holder := nil asValue.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   635
	holder value:(classItemList last list).
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   636
	builder aspectAt:#keyItemListHolder put:holder.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   637
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   638
    ^ holder
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   639
!
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   640
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   641
keyItemModel
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   642
    "model which keeps the current selected helpKey or nil
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   643
    "
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   644
    ^ keyItemModel.
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   645
!
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   646
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   647
valueOfEnablingCommitButtons
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   648
    "returns the enabling of the commit of this tool as value holder
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   649
    "
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   650
    masterApplication notNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   651
	^ masterApplication valueOfEnablingCommitButtons
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   652
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   653
    ^ contentsModifiedChannel
1336
3c84dc6f8d4b delegate valueOfInfoLabel to masterApplication if exists
ca
parents: 1329
diff changeset
   654
!
3c84dc6f8d4b delegate valueOfInfoLabel to masterApplication if exists
ca
parents: 1329
diff changeset
   655
3c84dc6f8d4b delegate valueOfInfoLabel to masterApplication if exists
ca
parents: 1329
diff changeset
   656
valueOfInfoLabel
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   657
    "returns the info label as value holder
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   658
    "
1336
3c84dc6f8d4b delegate valueOfInfoLabel to masterApplication if exists
ca
parents: 1329
diff changeset
   659
    masterApplication notNil ifTrue:[
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   660
	^ masterApplication valueOfInfoLabel
1336
3c84dc6f8d4b delegate valueOfInfoLabel to masterApplication if exists
ca
parents: 1329
diff changeset
   661
    ].
3c84dc6f8d4b delegate valueOfInfoLabel to masterApplication if exists
ca
parents: 1329
diff changeset
   662
    ^ super valueOfInfoLabel
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   663
! !
785417b6955d intitial checkin
ca
parents:
diff changeset
   664
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   665
!UIHelpTool methodsFor:'building'!
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   666
1663
60bd14266560 *** empty log message ***
ca
parents: 1648
diff changeset
   667
buildAndMergeFromClass:aClass
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   668
     "setup a new specClass, merge the current items into
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   669
     "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   670
     |root mergeItems|
1663
60bd14266560 *** empty log message ***
ca
parents: 1648
diff changeset
   671
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   672
     root := classItemList first.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   673
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   674
     root isUnspecified ifTrue:[ mergeItems := root children ]
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   675
		       ifFalse:[ mergeItems := nil ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   676
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   677
     self buildFromClass:aClass.
1663
60bd14266560 *** empty log message ***
ca
parents: 1648
diff changeset
   678
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   679
     mergeItems size ~~ 0 ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   680
	root := classItemList first.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   681
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   682
	mergeItems do:[:anItem| |item hkey|
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   683
	    hkey := anItem helpKey.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   684
	    item := root detectItemWithKey:hkey.
1663
60bd14266560 *** empty log message ***
ca
parents: 1648
diff changeset
   685
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   686
	    item isNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   687
		item := KeyItem helpKey:hkey helpText:(anItem helpText).
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   688
		root add:item sortBlock:[:a :b| a label < b label ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   689
	    ] ifFalse:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   690
		item helpText:(anItem helpText).
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   691
	    ]
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   692
	]
1663
60bd14266560 *** empty log message ***
ca
parents: 1648
diff changeset
   693
    ].
60bd14266560 *** empty log message ***
ca
parents: 1648
diff changeset
   694
!
60bd14266560 *** empty log message ***
ca
parents: 1648
diff changeset
   695
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   696
buildFromClass:aClass
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   697
    "reads the help dictionary from aClass and find remaining classes 
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   698
     'between' aClass and ApplicationModel
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   699
    " 
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   700
    |lastContents root list resource|
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   701
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   702
    specSelector isNil ifTrue:[ specSelector := #helpSpec ].
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   703
    specClass := self getHelpSpecClassFromClass:aClass.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   704
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   705
    list := OrderedCollection new.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   706
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   707
    (specClass isClass and:[specClass isLoaded]) ifTrue:[
1670
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   708
        lastContents := nil.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   709
        resource := specClass name, ' ', specSelector.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   710
        self addToHistory:(Association key:resource value:#'loadFromMessage:').
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   711
1670
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   712
        specClass withAllSuperclasses reverse do:[:aClass| |value name|
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   713
            lastContents isNil ifTrue:[
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   714
                aClass == ApplicationModel ifTrue:[ 
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   715
                    lastContents := IdentityDictionary new
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   716
                ].
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   717
            ] ifFalse:[
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   718
                root := ClassItem onClass:aClass.
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   719
1670
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   720
                (aClass class includesSelector:specSelector) ifTrue:[
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   721
                    value := aClass perform:specSelector.
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   722
1670
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   723
                    value keysAndValuesDo:[:k :v| |cval|
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   724
                        cval := lastContents at:k ifAbsent:self.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   725
                        cval = v ifFalse:[ root add:(KeyItem helpKey:k helpText:v) ].
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   726
                    ].
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   727
                    lastContents := value.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   728
                ].
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   729
                root sort:[:a :b| a label < b label ].
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   730
                root modified:false.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   731
                list add:root.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   732
            ]
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   733
        ]
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   734
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   735
    list isEmpty ifTrue:[
1670
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   736
        list add:(ClassItem onClass:nil)
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   737
    ].
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   738
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   739
    self withoutModifyDo:[
1670
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   740
        classItemList contents:list.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   741
        self updateIcons.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   742
        classItemModel value:(list last)
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   743
    ].
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   744
!
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   745
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   746
buildFromClass: aClass andSelector: aSelector
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   747
    "sets aSelector and reads the help dictionary from aClass
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   748
    "
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   749
    specSelector := aSelector.
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   750
    self buildFromClass:aClass
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   751
!
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   752
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   753
buildFromHelpTool:aHelpTool
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   754
    "build from another helpTool
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   755
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   756
    specClass     := aHelpTool specClass.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   757
    specSelector  := aHelpTool specSelector.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   758
    classItemList := aHelpTool classItemListHolder value.
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   759
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   760
    self classItemListHolder value:classItemList.
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   761
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   762
    classItemModel triggerValue:(classItemList last).
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   763
! !
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   764
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   765
!UIHelpTool methodsFor:'change & update'!
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   766
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   767
editModelChanged
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   768
    "called if the editModel changed
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   769
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   770
    |key|
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   771
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   772
    key := self helpKey.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   773
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   774
    modifiedHolder notNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   775
	modifiedHolder value:true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   776
    ].
963
62cdb7923a3b care for setup, before view components are built
Claus Gittinger <cg@exept.de>
parents: 946
diff changeset
   777
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   778
    contentsModifiedChannel value:false.
963
62cdb7923a3b care for setup, before view components are built
Claus Gittinger <cg@exept.de>
parents: 946
diff changeset
   779
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   780
    key notNil ifTrue:[
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   781
	keyItemModel value = key ifTrue:[^ self].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   782
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   783
	classItemList reverseDo:[:root| |item|
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   784
	    item := root detectItemWithKey:key.
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   785
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   786
	    item notNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   787
		classItemModel value:root.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   788
		keyItemModel   value:item.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   789
		^ self.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   790
	    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   791
	].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   792
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   793
	masterApplication isNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   794
	    "entered a new helpKey
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   795
	    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   796
	    self valueOfEnablingCommitButtons value:true.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   797
	].
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   798
    ].
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   799
    keyItemModel value:nil.
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   800
!
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   801
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   802
update:something with:aParameter from:changedObject
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   803
    "Invoked when an object that I depend upon sends a change notification.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   804
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   805
    |root item list|
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
   806
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   807
    changedObject == keyItemModel ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   808
	item := keyItemModel value.
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1554
diff changeset
   809
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   810
	item notNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   811
	    editModel value:(item helpKey).
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   812
	].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   813
	self cancel.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   814
	^ self
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   815
    ].
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   816
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   817
    changedObject == classItemModel ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   818
	root := classItemModel value.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   819
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   820
	root notNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   821
	    item := root detectItemWithKey:(self helpKey).
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   822
	    list := root list.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   823
	] ifFalse:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   824
	    list := item := nil.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   825
	].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   826
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   827
	item notNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   828
	    keyItemModel value:nil withoutNotifying:self.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   829
	].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   830
	self keyItemListHolder value:list.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   831
	keyItemModel value:item.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   832
	^ self
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   833
    ].
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   834
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   835
    changedObject == editModel ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   836
	self editModelChanged.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   837
	^ self
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   838
    ].
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   839
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   840
    changedObject == contentsModifiedChannel ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   841
	modifiedHolder notNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   842
	    modifiedHolder value:true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   843
	].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   844
	^ self
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   845
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   846
    super update:something with:aParameter from:changedObject
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   847
!
904
b40cce7f3748 use standard help calls
tz
parents: 896
diff changeset
   848
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   849
withoutModifyDo:aBlock
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   850
    "discard modifications; trigger not the modifiedHolder during
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   851
     the action is active.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   852
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   853
    |holder|
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   854
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   855
    holder := modifiedHolder.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   856
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   857
    holder isNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   858
	^ aBlock value
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   859
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   860
    ^ aBlock valueNowOrOnUnwindDo:[ modifiedHolder := holder ]
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   861
! !
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   862
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   863
!UIHelpTool methodsFor:'private'!
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   864
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   865
askForModification
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   866
    "asks for modification; launch a dialog if something is modified;
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   867
     returns true if the modifications are accepted by user otherwise
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   868
     false.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   869
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   870
    |dialog|
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   871
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   872
    self modified ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   873
	dialog := YesNoBox title:(resources string:'List was modified !!')
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   874
			 yesText:(resources string:'Forget it and proceed')
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   875
			  noText:(resources string:'Cancel').
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   876
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   877
	dialog showAtPointer.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   878
	dialog accepted ifFalse:[^ false].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   879
	self modified:false.
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   880
    ].
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   881
    ^ true
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   882
!
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   883
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   884
extractResourceFrom:aString
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   885
    "extracts class and selector from a resource string. On success
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   886
     an association with the key a class and the selector as value
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   887
     is returned. Otherwise nil is returned
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   888
    "
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   889
    |words newClass newSel|
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   890
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   891
    aString size ~~ 0 ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   892
	words := aString asCollectionOfWords.
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   893
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   894
	words size == 2 ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   895
	    newClass := self resolveName:(words first).
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   896
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   897
	    (newClass isClass and:[newClass isLoaded]) ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   898
		newSel := words last asSymbol.
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   899
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   900
		(newClass class includesSelector:newSel) ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   901
		    ^ Association key:newClass value:newSel            
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   902
		].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   903
	    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   904
	].
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   905
    ].
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   906
    ^ nil
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   907
!
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   908
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   909
getHelpSpecClassFromClass:aClass
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   910
    "oops
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   911
    "
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   912
    |cls|
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   913
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   914
    aClass notNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   915
	cls := self resolveName:aClass.
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   916
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   917
	cls notNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   918
	    cls := cls perform:#helpSpecClass ifNotUnderstood:cls.
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   919
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   920
	    (cls isClass and:[cls isLoaded]) ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   921
		^ cls
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   922
	    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   923
	].
761
91e524583390 do not save, if help texts have not changed (unformatting)
tz
parents: 750
diff changeset
   924
    ].
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   925
    ^ nil
761
91e524583390 do not save, if help texts have not changed (unformatting)
tz
parents: 750
diff changeset
   926
!
91e524583390 do not save, if help texts have not changed (unformatting)
tz
parents: 750
diff changeset
   927
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   928
loadFromMessage:aString
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   929
    "Set and rebuild the specClass and specSelector from a resource string.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   930
     On success true is returned otherwise false. If the current spec is
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   931
     modified, a dialog is launched.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   932
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   933
    |association|
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   934
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   935
    association := self extractResourceFrom:aString.
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   936
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   937
    association notNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   938
	self askForModification ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   939
	    self buildFromClass:(association key) andSelector:(association value).
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   940
	    ^ true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   941
	].
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   942
    ].
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   943
    ^ false
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   944
!
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   945
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   946
resourceMessage:aString
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   947
    "Set the specClass and specSelector from a resource string. On
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   948
     success true is returned otherwise false.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   949
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   950
    |association|
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   951
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   952
    association := self extractResourceFrom:aString.
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   953
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   954
    association notNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   955
	specClass    := association key.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   956
	specSelector := association value.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   957
	^ true
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   958
    ].
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   959
    ^ false
1670
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   960
!
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   961
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   962
updateIcons
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   963
    "update all icons (redefinitions below above or both)
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   964
    "
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   965
    |iconBelow iconAbove iconAboveAndBelow isBehind redefinedAbove redefinedBelow icon|
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   966
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   967
    "/ if only one class exists, its not possible to have redefinitions
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   968
    classItemList size > 1 ifFalse:[ ^ self ].
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   969
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   970
    iconBelow         := SystemBrowser medium_methodRedefinedBelowIcon.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   971
    iconAbove         := SystemBrowser medium_methodInheritedFromAboveIcon.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   972
    iconAboveAndBelow := SystemBrowser medium_methodInheritedFromAboveAndRedefinedBelowIcon.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   973
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   974
    classItemList do:[:runClass|
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   975
        runClass do:[:aKeyItem|
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   976
            isBehind := redefinedBelow := redefinedAbove := false.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   977
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   978
            classItemList do:[:testClass|
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   979
                testClass == runClass ifTrue:[
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   980
                    isBehind := true
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   981
                ] ifFalse:[
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   982
                    (testClass detectItemWithKey:(aKeyItem helpKey)) notNil ifTrue:[
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   983
                        isBehind ifTrue:[ redefinedBelow := true ]
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   984
                                ifFalse:[ redefinedAbove := true ].
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   985
                    ]
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   986
                ]
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   987
            ].
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   988
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   989
            redefinedBelow ifTrue:[
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   990
                redefinedAbove ifTrue:[ icon := iconAboveAndBelow ]
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   991
                              ifFalse:[ icon := iconBelow ]
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   992
            ] ifFalse:[
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   993
                redefinedAbove ifTrue:[ icon := iconAbove ]
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   994
                              ifFalse:[ icon := nil ]
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   995
            ].
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   996
            aKeyItem icon:icon.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   997
        ]
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   998
    ].
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   999
! !
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
  1000
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1001
!UIHelpTool methodsFor:'startup & release'!
369
9d34f1ff4d29 support of lineFeed charaters
ca
parents: 354
diff changeset
  1002
9d34f1ff4d29 support of lineFeed charaters
ca
parents: 354
diff changeset
  1003
closeRequest
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1004
    "asks for permission before closing
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1005
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1006
    (masterApplication isNil and:[self askForModification]) ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1007
	super closeRequest.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1008
    ].
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
  1009
!
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
  1010
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
  1011
initialize
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1012
    "setup default attributes
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1013
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1014
    super initialize.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1015
    self createBuilder.
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1016
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1017
    specSelector   := #helpSpec.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1018
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1019
    classItemList  := List new.
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
  1020
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1021
    classItemModel := nil asValue.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1022
    classItemModel addDependent:self.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1023
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1024
    keyItemModel := nil asValue.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1025
    keyItemModel addDependent:self.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1026
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1027
    contentsModifiedChannel := false asValue.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1028
    contentsModifiedChannel addDependent:self.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1029
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1030
    helpTextView := EditTextView new.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1031
    helpTextView acceptAction:[:dummy| self accept ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1032
    helpTextView modifiedChannel:contentsModifiedChannel.
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1033
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1034
    editModel := nil asValue.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1035
    editModel addDependent:self.
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
  1036
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1037
    self buildFromClass:nil.
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1038
!
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1039
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
  1040
openInterface:aSymbol
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1041
    "do not open as stand alone
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1042
    "
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1043
!
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1044
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1045
openOnClass:aClass
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1046
    "opens the UIHelpTool on aClass
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1047
    "
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1554
diff changeset
  1048
    self openOnClass:aClass andSelector:nil
940
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
  1049
!
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
  1050
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
  1051
openOnClass:aClass andSelector: aSelector
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
  1052
    "opens the UIHelpTool on aClass and aSelector"
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
  1053
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1054
    super openInterface:#windowSpecForStandAlone.
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1554
diff changeset
  1055
940
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
  1056
    builder window label: 'Help Tool'.
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1554
diff changeset
  1057
    self buildFromClass:aClass andSelector:aSelector
369
9d34f1ff4d29 support of lineFeed charaters
ca
parents: 354
diff changeset
  1058
! !
9d34f1ff4d29 support of lineFeed charaters
ca
parents: 354
diff changeset
  1059
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
  1060
!UIHelpTool methodsFor:'user actions'!
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
  1061
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1062
accept
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1063
    "accepts the help text
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1064
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1065
    |helpKey helpItem root|
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1066
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1067
    helpKey := self helpKey.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1068
    helpKey isNil ifTrue:[^ self].
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1069
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1070
    root := classItemModel value.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1071
    root isNil ifTrue:[^ self].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1072
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1073
    helpItem := root detectItemWithKey:helpKey.
1648
d88ec5777284 empty help string - add key anyway
Claus Gittinger <cg@exept.de>
parents: 1646
diff changeset
  1074
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1075
    helpItem isNil ifTrue:[
1670
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1076
        helpItem := KeyItem helpKey:helpKey helpText:(helpTextView contents).
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1077
        root add:helpItem sortBlock:[:a :b| a label < b label ].
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1078
        self updateIcons.
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1079
    ] ifFalse:[
1670
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1080
        helpItem helpText:(helpTextView contents).
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1081
    ].
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1082
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1083
    contentsModifiedChannel value:false.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1084
    keyItemModel triggerValue:helpItem.
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1085
!
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1086
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1087
cancel
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1088
    "cancel modifications, reload helpText
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1089
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1090
    |item contents modified|
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1091
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1092
    item := keyItemModel value.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1093
    modified := false.
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1094
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1095
    item notNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1096
	contents := item helpText.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1097
    ] ifFalse:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1098
	contents := nil.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1099
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1100
	modifiedHolder isNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1101
	    modified := self helpKey notNil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1102
	]
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1103
    ].
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1104
    helpTextView contents:contents.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1105
    contentsModifiedChannel value:modified.
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1106
!
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1107
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1108
doDelete
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1109
    "deletes the selected help key
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1110
    "
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1111
    |item|
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1112
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1113
    item := keyItemModel value.
1670
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1114
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1115
    item notNil ifTrue:[
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1116
        item remove.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1117
        item icon notNil ifTrue:[ self updateIcons ].
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1118
    ].    
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1119
    editModel value:nil.
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1120
!
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1121
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1122
doLoad
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1123
    "opens a Resource Selection Browser in order to get a resource message
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1124
    "
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1125
    self loadFromMessage: 
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1126
	(ResourceSelectionBrowser
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1127
	    request: 'Load Help Spec From Class'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1128
	    onSuperclass: nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1129
	    andClass: specClass
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1130
	    andSelector: specSelector ? #help
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1131
	    withResourceTypes: (Array with: #help)).
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1132
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1133
    self updateInfoLabel
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1134
!
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
  1135
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1136
doNew
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1137
    "reset all to empty
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1138
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1139
    contentsModifiedChannel value:false.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1140
    self helpKey:nil.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1141
    self buildFromClass:nil.
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1142
!
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1143
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1144
doSave
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1145
    "save the help spec to the spec-class(es)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1146
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1147
    specClass isNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1148
        self information:(resources string:'No class specified !!').
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1149
        ^ nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1150
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1151
    (specClass isSubclassOf:ApplicationModel) ifFalse:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1152
        self information:(resources string:'Cannot save help into none Application class').
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1153
        ^ nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1154
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1155
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1156
    classItemList do:[:aClassItem| aClassItem createHelpMethodNamed:specSelector ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1157
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1158
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1159
openDocumentation
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1160
    "opens the documentation file of the Help Tool
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1161
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1162
    self openHTMLDocument: 'tools/uipainter/HelpTool.html'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1163
! !
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1164
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1165
!UIHelpTool::ClassItem class methodsFor:'instance creation'!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1166
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1167
onClass:aClass
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1168
    |root|
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1169
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1170
    root := self new.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1171
    root onClass:aClass.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1172
    ^ root
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1173
! !
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1174
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1175
!UIHelpTool::ClassItem methodsFor:'accessing'!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1176
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1177
list
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1178
    "returns the hierarchical list assigned to the classItem; the
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1179
     list contains the keyItems
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1180
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1181
    list isNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1182
	list := HierarchicalList new.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1183
	list showRoot:false.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1184
	list root:self.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1185
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1186
    ^ list
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1187
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1188
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1189
theClass
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1190
    "returns the class or nil if unspecified
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1191
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1192
    ^ theClass
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1193
! !
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1194
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1195
!UIHelpTool::ClassItem methodsFor:'change & update'!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1196
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1197
helpTextChangedFor:anItem
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1198
    "called if an helpKey changed its contents
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1199
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1200
    self model notNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1201
	self   modified:true.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1202
	anItem modified:true.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1203
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1204
! !
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1205
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1206
!UIHelpTool::ClassItem methodsFor:'code generation'!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1207
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1208
createHelpMethodNamed:aMethodName
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1209
    |stream|
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1210
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1211
    (modified and:[theClass notNil]) ifFalse:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1212
        ^ self
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1213
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1214
    stream := '' writeStream.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1215
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1216
    stream nextPutAll:
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1217
        aMethodName, '\' withCRs,
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1218
        (ResourceSpecEditor codeGenerationCommentForClass:UIHelpTool) withCRs,
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1219
    '\\' withCRs,
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1220
    '    "\' withCRs,
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1221
    '     UIHelpTool openOnClass:', theClass name asString ,'    
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1222
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1223
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1224
    <resource: #help>
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1225
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1226
    ^ super ', aMethodName, ' addPairsFrom:#(
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1227
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1228
'.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1229
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1230
    self do:[:aKeyItem| |helpText|
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1231
        helpText := aKeyItem helpText.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1232
        helpText isNil ifTrue:[ helpText := '' ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1233
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1234
        stream nextPutLine:(aKeyItem helpKey storeString).
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1235
        stream nextPutLine:(helpText storeString); cr.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1236
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1237
    stream nextPutLine:')'.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1238
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1239
    Compiler 
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1240
        compile:(stream contents)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1241
        forClass:theClass class 
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1242
        inCategory:'help specs'.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1243
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1244
    self modified:false.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1245
! !
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1246
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1247
!UIHelpTool::ClassItem methodsFor:'displaying'!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1248
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1249
icon
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1250
    "returns the display icon (always nil)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1251
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1252
    ^ nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1253
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1254
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1255
label
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1256
    "returns the display label
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1257
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1258
    |label|
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1259
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1260
    theClass notNil ifTrue:[ label := theClass name ]
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1261
		   ifFalse:[ label := '** not yet defined **' ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1262
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1263
    modified ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1264
	label := Text string:label color:(Color red).
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1265
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1266
    ^ label
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1267
! !
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1268
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1269
!UIHelpTool::ClassItem methodsFor:'instance creation'!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1270
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1271
initialize
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1272
    "setup defaults
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1273
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1274
    super initialize.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1275
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1276
    children   := OrderedCollection new.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1277
    isExpanded := true.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1278
    modified   := false.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1279
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1280
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1281
onClass:aClass
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1282
    "the class the ys are assigned to; if the class is nil,
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1283
     the class is not yet specified.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1284
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1285
    theClass := aClass.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1286
! !
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1287
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1288
!UIHelpTool::ClassItem methodsFor:'private'!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1289
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1290
basicAdd:aChild sortBlock:aBlock
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1291
    "catch low-level add to update the modification flag
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1292
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1293
    self   modified:true.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1294
    aChild modified:true.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1295
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1296
    ^ super basicAdd:aChild sortBlock:aBlock.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1297
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1298
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1299
basicAddAll:aList beforeIndex:anIndex
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1300
    "catch low-level add to update the modification flag
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1301
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1302
    self modified:true.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1303
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1304
    aList do:[:el| el modified:true ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1305
    ^ super basicAddAll:aList beforeIndex:anIndex.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1306
!
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1307
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1308
basicRemoveFromIndex:startIndex toIndex:stopIndex
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1309
    "catch low-level remove to update the modification flag
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1310
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1311
    self isUnspecified ifFalse:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1312
	self modified:true.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1313
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1314
    ^ super basicRemoveFromIndex:startIndex toIndex:stopIndex
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1315
! !
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1316
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1317
!UIHelpTool::ClassItem methodsFor:'queries'!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1318
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1319
isUnspecified
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1320
    "true if the class is unspecified
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1321
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1322
    ^ theClass isNil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1323
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1324
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1325
modified
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1326
    "true, if any item is modified, created or deleted
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1327
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1328
    ^ modified
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1329
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1330
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1331
modified:aBoolean
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1332
    "true, if any item is modified, created or deleted
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1333
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1334
    modified ~~ aBoolean ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1335
	modified := aBoolean.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1336
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1337
	modified ifFalse:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1338
	    self do:[:el| el modified:false ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1339
	].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1340
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1341
! !
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1342
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1343
!UIHelpTool::ClassItem methodsFor:'searching'!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1344
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1345
detectItemWithKey:aKey
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1346
    "returns the item assigned to a helpKey or nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1347
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1348
    |key|
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1349
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1350
    aKey size ~~ 0 ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1351
	key := aKey asSymbol.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1352
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1353
	self do:[:anItem|
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1354
	    anItem helpKey == key ifTrue:[ ^ anItem ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1355
	]
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1356
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1357
    ^ nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1358
! !
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1359
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1360
!UIHelpTool::KeyItem class methodsFor:'instance creation'!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1361
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1362
helpKey:aKey helpText:aText
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1363
    |key|
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1364
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1365
    key := self new.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1366
    key helpKey:aKey helpText:aText.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1367
    ^ key
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1368
! !
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1369
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1370
!UIHelpTool::KeyItem methodsFor:'accessing'!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1371
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1372
helpKey
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1373
    "returns the helpKey, a symbol
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1374
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1375
    ^ helpKey
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1376
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1377
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1378
helpText
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1379
    "returns the contents assigned to the helpKey or nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1380
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1381
    ^ helpText
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1382
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1383
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1384
helpText:aText
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1385
    "set the contents assigned to the helpKey; if the cxontents changed,
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1386
     a notification is raised.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1387
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1388
    |text|
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1389
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1390
    text := self formatText:aText.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1391
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1392
    text ~= helpText ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1393
	helpText := text.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1394
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1395
	(modified or:[parent isNil]) ifFalse:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1396
	    parent helpTextChangedFor:self.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1397
	]
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1398
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1399
! !
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1400
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1401
!UIHelpTool::KeyItem methodsFor:'displaying'!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1402
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1403
icon
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1404
    "returns the display icon (always nil)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1405
    "
1670
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1406
    ^ icon
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1407
!
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1408
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1409
icon:anIcon
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1410
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1411
    icon ~= anIcon ifTrue:[
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1412
        icon := anIcon.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1413
        self changed:#icon.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1414
    ].
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1415
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1416
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1417
label
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1418
    "returns the display label
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1419
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1420
    modified ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1421
	^ Text string:helpKey color:(Color red)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1422
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1423
    ^ helpKey
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1424
! !
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1425
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1426
!UIHelpTool::KeyItem methodsFor:'instance creation'!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1427
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1428
helpKey:aKey helpText:aText
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1429
    "set the key and contents without a change notification
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1430
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1431
    helpKey  := aKey asSymbol.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1432
    helpText := self formatText:aText.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1433
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1434
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1435
initialize
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1436
    "setup defaults
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1437
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1438
    super initialize.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1439
    children := #().
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1440
    modified := false.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1441
! !
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1442
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1443
!UIHelpTool::KeyItem methodsFor:'private'!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1444
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1445
formatText:aText
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1446
    "format the text, replace carriage return by spaces and compress spaces
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1447
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1448
    |text result|
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1449
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1450
    aText size ~~ 0 ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1451
	text := aText asString asCollectionOfWords.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1452
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1453
	text notEmpty ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1454
	    result := text first.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1455
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1456
	    text from:2 do:[:t| result := result, ' ', t ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1457
	    ^ result
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1458
       ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1459
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1460
    ^ nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1461
! !
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset