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