0
|
1 |
"
|
5
|
2 |
COPYRIGHT (c) 1991 by Claus Gittinger
|
0
|
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 |
StandardSystemView subclass:#Launcher
|
8
|
14 |
instanceVariableNames:'myMenu exitBox saveBox enterBox'
|
0
|
15 |
classVariableNames:''
|
|
16 |
poolDictionaries:''
|
|
17 |
category:'Interface-Smalltalk'
|
|
18 |
!
|
|
19 |
|
|
20 |
Launcher comment:'
|
|
21 |
|
5
|
22 |
COPYRIGHT (c) 1991 by Claus Gittinger
|
0
|
23 |
All Rights Reserved
|
|
24 |
|
|
25 |
allows startup of smalltalk applications
|
|
26 |
|
12
|
27 |
$Header: /cvs/stx/stx/libtool/OldLauncher.st,v 1.6 1993-12-19 00:43:32 claus Exp $
|
0
|
28 |
written spring 91 by claus
|
|
29 |
'!
|
|
30 |
|
|
31 |
!Launcher class methodsFor:'instance creation'!
|
|
32 |
|
|
33 |
new
|
|
34 |
^ super
|
|
35 |
extent:(100 @ 100)
|
8
|
36 |
label:'smallTalk'
|
|
37 |
icon:(Form fromFile:'SmalltalkX.xbm' resolution:100)
|
0
|
38 |
|
|
39 |
"Launcher start"
|
|
40 |
! !
|
|
41 |
|
3
|
42 |
!Launcher methodsFor:'initialize / release'!
|
0
|
43 |
|
|
44 |
initialize
|
|
45 |
super initialize.
|
|
46 |
|
|
47 |
myMenu := ClickMenuView
|
3
|
48 |
labels:(resources array:#(
|
8
|
49 |
'Browsers ...'
|
3
|
50 |
'Workspace'
|
8
|
51 |
'File Browser'
|
|
52 |
'Projects ...'
|
3
|
53 |
'-'
|
8
|
54 |
'Utilities ...'
|
|
55 |
'Goodies ...'
|
|
56 |
'Games & Demos ...'
|
3
|
57 |
'-'
|
8
|
58 |
'info & help ...'
|
3
|
59 |
'-'
|
|
60 |
'snapshot'
|
|
61 |
'-'
|
|
62 |
'exit'
|
|
63 |
))
|
8
|
64 |
selectors:#(browserMenu
|
|
65 |
startWorkspace
|
0
|
66 |
startFileBrowser
|
8
|
67 |
projectMenu
|
0
|
68 |
nil
|
|
69 |
utilityMenu
|
|
70 |
goodyMenu
|
|
71 |
gamesMenu
|
|
72 |
nil
|
|
73 |
helpMenu
|
|
74 |
nil
|
|
75 |
saveImage
|
|
76 |
nil
|
|
77 |
exitSmalltalk
|
|
78 |
)
|
|
79 |
receiver:self
|
|
80 |
in:self.
|
|
81 |
|
8
|
82 |
myMenu subMenuAt:#browserMenu put:(
|
3
|
83 |
PopUpMenu labels:(resources array:#(
|
8
|
84 |
'System Browser'
|
|
85 |
'Class Hierarchy Browser'
|
|
86 |
'Implementors'
|
|
87 |
'Senders'
|
0
|
88 |
'-'
|
8
|
89 |
'Changes Browser'
|
0
|
90 |
'-'
|
8
|
91 |
'Directory Browser'
|
3
|
92 |
))
|
0
|
93 |
selectors:#(
|
8
|
94 |
startSystemBrowser
|
|
95 |
startHierarchyBrowser
|
|
96 |
startImplementorsBrowser
|
|
97 |
startSendersBrowser
|
0
|
98 |
nil
|
8
|
99 |
startChangesBrowser
|
0
|
100 |
nil
|
8
|
101 |
startDirectoryBrowser
|
0
|
102 |
)
|
|
103 |
receiver:self
|
|
104 |
for:self
|
|
105 |
|
|
106 |
).
|
|
107 |
|
8
|
108 |
myMenu subMenuAt:#utilityMenu put:(
|
3
|
109 |
PopUpMenu labels:(resources array:#(
|
8
|
110 |
'Transcript'
|
|
111 |
'-'
|
|
112 |
'Window tree'
|
|
113 |
'Class tree'
|
|
114 |
'-'
|
|
115 |
'Event monitor'
|
|
116 |
'Process monitor'
|
|
117 |
'Memory monitor'
|
|
118 |
'Memory usage'
|
0
|
119 |
'-'
|
8
|
120 |
'collect Garbage'
|
|
121 |
'collect Garbage & compress'
|
|
122 |
'ScreenSaver ...'
|
|
123 |
))
|
|
124 |
selectors:#(
|
|
125 |
startTranscript
|
|
126 |
nil
|
|
127 |
startWindowTreeView
|
|
128 |
startClassTreeView
|
|
129 |
nil
|
|
130 |
startEventMonitor
|
|
131 |
startProcessMonitor
|
|
132 |
startMemoryMonitor
|
|
133 |
startMemoryUsage
|
|
134 |
nil
|
|
135 |
garbageCollect
|
|
136 |
compressingGarbageCollect
|
|
137 |
screenSaverMenu
|
|
138 |
)
|
|
139 |
receiver:self
|
|
140 |
for:self
|
|
141 |
).
|
|
142 |
|
|
143 |
(myMenu subMenuAt:#utilityMenu) subMenuAt:#screenSaverMenu put:(
|
|
144 |
PopUpMenu labels:(resources array:#(
|
|
145 |
'simple'
|
|
146 |
'spotlight'
|
|
147 |
'moving spotlight'
|
3
|
148 |
))
|
0
|
149 |
selectors:#(
|
8
|
150 |
startScreenSaver1
|
|
151 |
startScreenSaver2
|
|
152 |
startScreenSaver3
|
|
153 |
)
|
|
154 |
receiver:self
|
|
155 |
for:self
|
|
156 |
).
|
|
157 |
|
12
|
158 |
(Display isKindOf:GLXWorkstation) ifTrue:[
|
8
|
159 |
myMenu subMenuAt:#gamesMenu put:(
|
|
160 |
PopUpMenu labels:(resources array:#(
|
|
161 |
'Tetris'
|
|
162 |
'TicTacToe'
|
|
163 |
'-'
|
|
164 |
'Animation'
|
|
165 |
'Globe'
|
|
166 |
'-'
|
|
167 |
'GL-rotating plane'
|
12
|
168 |
'GL-rotating cube'
|
|
169 |
'GL-rotating tetra'
|
8
|
170 |
'GL-light around sphere'
|
|
171 |
'GL-teapot'
|
|
172 |
'-'
|
|
173 |
'LogicTool'
|
|
174 |
))
|
|
175 |
selectors:#(
|
|
176 |
startTetris
|
|
177 |
startTicTacToe
|
|
178 |
nil
|
|
179 |
startAnimation
|
|
180 |
startGlobeDemo
|
|
181 |
nil
|
|
182 |
startGLPlaneDemo
|
12
|
183 |
startGLCubeDemo
|
|
184 |
startGLTetraDemo
|
8
|
185 |
startGLSphereDemo
|
|
186 |
startGLTeapotDemo
|
|
187 |
nil
|
|
188 |
startLogicTool
|
|
189 |
)
|
|
190 |
receiver:self
|
|
191 |
for:self
|
|
192 |
).
|
|
193 |
] ifFalse:[
|
|
194 |
myMenu subMenuAt:#gamesMenu put:(
|
|
195 |
PopUpMenu labels:(resources array:#(
|
|
196 |
'Tetris'
|
|
197 |
'TicTacToe'
|
|
198 |
'-'
|
|
199 |
'Animation'
|
|
200 |
'Globe'
|
|
201 |
'-'
|
|
202 |
'LogicTool'
|
|
203 |
))
|
|
204 |
selectors:#(
|
|
205 |
startTetris
|
|
206 |
startTicTacToe
|
|
207 |
nil
|
|
208 |
startAnimation
|
|
209 |
startGlobeDemo
|
|
210 |
nil
|
|
211 |
startLogicTool
|
|
212 |
)
|
|
213 |
receiver:self
|
|
214 |
for:self
|
|
215 |
)
|
|
216 |
].
|
|
217 |
|
|
218 |
myMenu subMenuAt:#projectMenu put:(
|
|
219 |
PopUpMenu labels:(resources array:#(
|
|
220 |
'new project'
|
|
221 |
'-'
|
|
222 |
'select project'
|
|
223 |
))
|
|
224 |
selectors:#(
|
|
225 |
newProject
|
0
|
226 |
nil
|
8
|
227 |
selectProject
|
0
|
228 |
)
|
|
229 |
receiver:self
|
|
230 |
for:self
|
|
231 |
|
|
232 |
).
|
|
233 |
|
|
234 |
myMenu subMenuAt:#goodyMenu put:(
|
3
|
235 |
PopUpMenu labels:(resources array:#(
|
0
|
236 |
'Clock'
|
|
237 |
'Address Book'
|
|
238 |
'-'
|
|
239 |
'Directory View'
|
|
240 |
'MailTool'
|
|
241 |
'NewsTool'
|
|
242 |
'-'
|
|
243 |
'DrawTool'
|
3
|
244 |
))
|
0
|
245 |
selectors:#(
|
|
246 |
startClock
|
|
247 |
startAddressBook
|
|
248 |
nil
|
|
249 |
startDirectoryView
|
|
250 |
startMailTool
|
|
251 |
startNewsTool
|
|
252 |
nil
|
|
253 |
startDrawTool
|
|
254 |
)
|
|
255 |
receiver:self
|
|
256 |
for:self
|
|
257 |
|
|
258 |
).
|
|
259 |
|
|
260 |
myMenu subMenuAt:#helpMenu put:(
|
3
|
261 |
PopUpMenu labels:(resources array:#(
|
0
|
262 |
'Overview'
|
|
263 |
'Getting started'
|
8
|
264 |
'Customizing'
|
11
|
265 |
'Tools ...'
|
0
|
266 |
'-'
|
|
267 |
'Help Browser'
|
3
|
268 |
))
|
0
|
269 |
selectors:#(
|
|
270 |
showOverview
|
|
271 |
showGettingStarted
|
8
|
272 |
showCustomizing
|
11
|
273 |
tools
|
0
|
274 |
nil
|
|
275 |
startHelpView
|
|
276 |
)
|
|
277 |
receiver:self
|
|
278 |
for:self
|
|
279 |
|
|
280 |
).
|
|
281 |
|
11
|
282 |
(myMenu subMenuAt:#helpMenu) subMenuAt:#tools put:(
|
|
283 |
PopUpMenu labels:(resources array:#(
|
|
284 |
'System Browser'
|
|
285 |
))
|
|
286 |
selectors:#(
|
|
287 |
showSystemBrowserDocumentation
|
|
288 |
)
|
|
289 |
receiver:self
|
|
290 |
for:self
|
|
291 |
|
|
292 |
).
|
|
293 |
|
0
|
294 |
myMenu borderWidth:0.
|
|
295 |
myMenu origin:(0 @ 0).
|
|
296 |
myMenu font:(self font).
|
3
|
297 |
self extent:(myMenu extent).
|
|
298 |
|
|
299 |
exitBox := EnterBox2 new.
|
|
300 |
exitBox title:(resources at:'save state before exiting ?\\filename for image:') withCRs.
|
|
301 |
exitBox abortText:(resources at:'abort').
|
|
302 |
exitBox okText:(resources at:'exit').
|
|
303 |
exitBox okText2:(resources at:'save & exit').
|
|
304 |
|
|
305 |
saveBox := EnterBox new.
|
|
306 |
saveBox title:(resources at:'filename for image:') withCRs.
|
|
307 |
saveBox abortText:(resources at:'abort').
|
|
308 |
saveBox okText:(resources at:'save').
|
8
|
309 |
|
|
310 |
enterBox := EnterBox new.
|
|
311 |
enterBox abortText:(resources at:'abort').
|
|
312 |
enterBox okText:(resources at:'browse').
|
0
|
313 |
!
|
|
314 |
|
|
315 |
realize
|
|
316 |
self extent:(myMenu extent).
|
|
317 |
self minExtent:(myMenu extent).
|
|
318 |
self maxExtent:(myMenu extent).
|
|
319 |
super realize
|
|
320 |
!
|
|
321 |
|
|
322 |
reinitialize
|
|
323 |
"sent after snapin - first reinit menuview,
|
|
324 |
then adjust my size"
|
|
325 |
|
|
326 |
super reinitialize.
|
|
327 |
myMenu reinitialize.
|
|
328 |
self extent:(myMenu extent).
|
|
329 |
!
|
|
330 |
|
3
|
331 |
destroy
|
|
332 |
exitBox notNil ifTrue:[
|
|
333 |
exitBox destroy.
|
|
334 |
exitBox := nil
|
|
335 |
].
|
|
336 |
saveBox notNil ifTrue:[
|
8
|
337 |
saveBox destroy.
|
3
|
338 |
saveBox := nil
|
|
339 |
].
|
8
|
340 |
enterBox notNil ifTrue:[
|
|
341 |
enterBox destroy.
|
|
342 |
enterBox := nil
|
|
343 |
].
|
3
|
344 |
super destroy
|
|
345 |
!
|
|
346 |
|
0
|
347 |
addToCurrentProject
|
|
348 |
"ignored here"
|
|
349 |
|
|
350 |
^ self
|
|
351 |
! !
|
|
352 |
|
8
|
353 |
!Launcher methodsFor:'private'!
|
|
354 |
|
|
355 |
showDocumentFile:name
|
|
356 |
|s f isRTF|
|
|
357 |
|
|
358 |
isRTF := true.
|
|
359 |
s := Smalltalk systemFileStreamFor:name , '.rtf'.
|
|
360 |
s isNil ifTrue:[
|
|
361 |
isRTF := false.
|
|
362 |
s := Smalltalk systemFileStreamFor:name , '.doc'.
|
|
363 |
s isNil ifTrue:[
|
|
364 |
self warn:('document ' , name , ' (.rtf/.doc) not available.').
|
|
365 |
^ nil
|
|
366 |
].
|
|
367 |
].
|
|
368 |
f := s pathName.
|
|
369 |
|
|
370 |
isRTF ifTrue:[
|
|
371 |
DocumentView startOn:f.
|
|
372 |
^ self
|
|
373 |
].
|
|
374 |
|
|
375 |
(EditTextView startOn:f) readOnly
|
|
376 |
! !
|
|
377 |
|
0
|
378 |
!Launcher methodsFor:'events'!
|
|
379 |
|
|
380 |
saveAndTerminate
|
|
381 |
ObjectMemory snapShotOn:name
|
|
382 |
! !
|
|
383 |
|
|
384 |
!Launcher methodsFor:'user interaction'!
|
|
385 |
|
8
|
386 |
startSystemBrowser
|
|
387 |
SystemBrowser start
|
0
|
388 |
!
|
|
389 |
|
8
|
390 |
startHierarchyBrowser
|
|
391 |
enterBox title:(resources at:'name of class:') withCRs.
|
|
392 |
enterBox okText:(resources at:'browse').
|
|
393 |
|
|
394 |
enterBox action:[:name |
|
|
395 |
|class|
|
|
396 |
|
|
397 |
class := Smalltalk at:name asSymbol ifAbsent:[nil].
|
|
398 |
class isBehavior ifFalse:[
|
|
399 |
self warn:(resources at:'no such class')
|
|
400 |
] ifTrue:[
|
|
401 |
SystemBrowser browseClassHierarchy:class
|
|
402 |
]
|
|
403 |
].
|
|
404 |
enterBox showAtPointer
|
|
405 |
!
|
|
406 |
|
|
407 |
startImplementorsBrowser
|
|
408 |
enterBox title:(resources at:'selector:') withCRs.
|
|
409 |
enterBox okText:(resources at:'browse').
|
|
410 |
|
|
411 |
enterBox action:[:selectorName |
|
|
412 |
SystemBrowser browseImplementorsOf:selectorName
|
|
413 |
].
|
|
414 |
enterBox showAtPointer
|
|
415 |
!
|
|
416 |
|
|
417 |
startSendersBrowser
|
|
418 |
enterBox title:(resources at:'selector:') withCRs.
|
|
419 |
enterBox okText:(resources at:'browse').
|
|
420 |
|
|
421 |
enterBox action:[:selectorName |
|
|
422 |
SystemBrowser browseAllCallsOn:selectorName
|
|
423 |
].
|
|
424 |
enterBox showAtPointer
|
0
|
425 |
!
|
|
426 |
|
|
427 |
startChangesBrowser
|
|
428 |
ChangesBrowser start
|
|
429 |
!
|
|
430 |
|
|
431 |
startFileBrowser
|
|
432 |
FileBrowser start
|
|
433 |
!
|
|
434 |
|
|
435 |
startDirectoryBrowser
|
|
436 |
DirectoryBrowser start
|
|
437 |
!
|
|
438 |
|
|
439 |
startDirectoryView
|
|
440 |
DirectoryView start
|
|
441 |
!
|
|
442 |
|
|
443 |
startWorkspace
|
|
444 |
Workspace start
|
|
445 |
!
|
|
446 |
|
|
447 |
startWindowTreeView
|
|
448 |
WindowTreeView start
|
|
449 |
!
|
|
450 |
|
|
451 |
startClassTreeView
|
|
452 |
ClassTreeGraphView start
|
|
453 |
!
|
|
454 |
|
|
455 |
startEventMonitor
|
|
456 |
EventMonitor start
|
|
457 |
!
|
|
458 |
|
8
|
459 |
startProcessMonitor
|
|
460 |
ProcessMonitor start
|
0
|
461 |
!
|
|
462 |
|
|
463 |
startMemoryMonitor
|
8
|
464 |
MemoryMonitor start
|
|
465 |
!
|
|
466 |
|
|
467 |
startMemoryUsage
|
|
468 |
MemoryUsageView start
|
0
|
469 |
!
|
|
470 |
|
|
471 |
startTranscript
|
|
472 |
((Smalltalk at:#Transcript) isKindOf:TextCollector) ifTrue:[
|
|
473 |
"there is only one transcript !!"
|
|
474 |
Transcript realize. "maybe it was iconified"
|
|
475 |
Transcript raise
|
|
476 |
] ifFalse:[
|
|
477 |
Smalltalk at:#Transcript put:(TextCollector newTranscript)
|
|
478 |
]
|
|
479 |
!
|
|
480 |
|
8
|
481 |
startScreenSaver1
|
|
482 |
ScreenSaver start
|
|
483 |
!
|
|
484 |
|
|
485 |
startScreenSaver2
|
|
486 |
LightInTheDark start
|
|
487 |
!
|
|
488 |
|
|
489 |
startScreenSaver3
|
|
490 |
LightInTheDark2 start
|
|
491 |
!
|
|
492 |
|
0
|
493 |
newProject
|
8
|
494 |
(ProjectView for:(Project new)) open
|
|
495 |
!
|
|
496 |
|
|
497 |
selectProject
|
|
498 |
|list box|
|
|
499 |
|
|
500 |
list := Project allInstances.
|
|
501 |
box := ListSelectionBox new.
|
|
502 |
box list:(list collect:[:p | p name]).
|
|
503 |
box title:(resources string:'select a project').
|
|
504 |
box action:[:selection |
|
|
505 |
|project|
|
|
506 |
|
|
507 |
project := list detect:[:p | p name = selection] ifNone:[nil].
|
|
508 |
project isNil ifTrue:[
|
|
509 |
Transcript showCr:'no such project'
|
|
510 |
] ifFalse:[
|
|
511 |
project showViews.
|
|
512 |
Project current:project
|
|
513 |
]
|
|
514 |
].
|
|
515 |
box showAtPointer
|
0
|
516 |
!
|
|
517 |
|
|
518 |
startXterm
|
|
519 |
OperatingSystem executeCommand:'xterm &'
|
|
520 |
!
|
|
521 |
|
|
522 |
startAddressBook
|
|
523 |
AddressBook start
|
|
524 |
!
|
|
525 |
|
|
526 |
startNewsTool
|
|
527 |
NewsView start
|
|
528 |
!
|
|
529 |
|
|
530 |
startMailTool
|
|
531 |
MailView start
|
|
532 |
!
|
|
533 |
|
|
534 |
startClock
|
|
535 |
Clock start
|
|
536 |
!
|
|
537 |
|
|
538 |
startRoundClock
|
|
539 |
RoundClock start
|
|
540 |
!
|
|
541 |
|
|
542 |
startAnimation
|
|
543 |
Animation start
|
|
544 |
!
|
|
545 |
|
|
546 |
startGlobeDemo
|
|
547 |
GlobeDemo start
|
|
548 |
!
|
|
549 |
|
|
550 |
startRoundGlobeDemo
|
|
551 |
RoundGlobeDemo start
|
|
552 |
!
|
|
553 |
|
8
|
554 |
startGLSphereDemo
|
|
555 |
GLSphereDemoView2 start
|
|
556 |
!
|
|
557 |
|
|
558 |
startGLTeapotDemo
|
|
559 |
GLTeapotDemo start
|
|
560 |
!
|
|
561 |
|
|
562 |
startGLPlaneDemo
|
|
563 |
GLPlaneDemoView2 start
|
|
564 |
!
|
|
565 |
|
12
|
566 |
startGLCubeDemo
|
|
567 |
GLCubeDemoView start
|
|
568 |
!
|
|
569 |
|
|
570 |
startGLTetraDemo
|
|
571 |
GLTetraDemoView start
|
|
572 |
!
|
|
573 |
|
0
|
574 |
startTetris
|
|
575 |
Tetris start
|
|
576 |
!
|
|
577 |
|
|
578 |
startTicTacToe
|
|
579 |
TicTacToe start
|
|
580 |
!
|
|
581 |
|
|
582 |
startDrawTool
|
|
583 |
DrawTool start
|
|
584 |
!
|
|
585 |
|
|
586 |
startLogicTool
|
|
587 |
LogicTool start
|
|
588 |
!
|
|
589 |
|
|
590 |
garbageCollect
|
8
|
591 |
ObjectMemory markAndSweep
|
|
592 |
!
|
|
593 |
|
|
594 |
compressingGarbageCollect
|
0
|
595 |
|nBytesBefore nReclaimed|
|
|
596 |
|
|
597 |
nBytesBefore := ObjectMemory oldSpaceUsed.
|
|
598 |
ObjectMemory garbageCollect.
|
|
599 |
nReclaimed := nBytesBefore - ObjectMemory oldSpaceUsed.
|
|
600 |
nReclaimed > 0 ifTrue:[
|
|
601 |
Transcript show:'reclaimed '.
|
|
602 |
nReclaimed > 1024 ifTrue:[
|
|
603 |
nReclaimed > (1024 * 1024) ifTrue:[
|
|
604 |
Transcript show:(nReclaimed // (1024 * 1024)) printString.
|
|
605 |
Transcript showCr:' Mb.'
|
|
606 |
] ifFalse:[
|
|
607 |
Transcript show:(nReclaimed // 1024) printString.
|
|
608 |
Transcript showCr:' Kb.'
|
|
609 |
]
|
|
610 |
] ifFalse:[
|
|
611 |
Transcript show:nReclaimed printString.
|
|
612 |
Transcript showCr:' bytes.'
|
|
613 |
]
|
|
614 |
]
|
|
615 |
!
|
|
616 |
|
3
|
617 |
warnIfAbsent:aPath
|
|
618 |
|s|
|
0
|
619 |
|
3
|
620 |
s := Smalltalk systemFileStreamFor:aPath.
|
|
621 |
s isNil ifTrue:[
|
|
622 |
self warn:('document ' , aPath , ' not available').
|
|
623 |
^ nil
|
|
624 |
].
|
|
625 |
^ s pathName
|
|
626 |
!
|
|
627 |
|
|
628 |
showOverview
|
8
|
629 |
self showDocumentFile:'doc/overview'
|
|
630 |
!
|
3
|
631 |
|
8
|
632 |
showCustomizing
|
|
633 |
self showDocumentFile:'doc/manuals/customizing'
|
0
|
634 |
!
|
|
635 |
|
|
636 |
showGettingStarted
|
8
|
637 |
self showDocumentFile:'doc/manuals/gettingStarted'
|
0
|
638 |
!
|
|
639 |
|
11
|
640 |
showSystemBrowserDocumentation
|
|
641 |
self showDocumentFile:'doc/misc/browser'
|
|
642 |
!
|
|
643 |
|
0
|
644 |
startHelpView
|
|
645 |
self warn:'The HelpSystem is still under construction.
|
|
646 |
|
|
647 |
You will see a pre-pre release.'.
|
|
648 |
HelpView start
|
|
649 |
!
|
|
650 |
|
|
651 |
saveImage
|
|
652 |
saveBox isNil ifTrue:[
|
|
653 |
saveBox := EnterBox new.
|
|
654 |
saveBox title:(resources at:'filename for image:') withCRs.
|
11
|
655 |
" saveBox abortText:(resources at:'abort')." "this is the default anyway ..."
|
0
|
656 |
saveBox okText:(resources at:'save')
|
|
657 |
].
|
|
658 |
"this is a kludge - put into above if when
|
|
659 |
stack contexts survive a snapout/snapin"
|
|
660 |
|
|
661 |
saveBox action:[:name |
|
|
662 |
ObjectMemory snapShotOn:name.
|
|
663 |
].
|
|
664 |
|
|
665 |
(ImageName isNil or:[ImageName isBlank]) ifTrue:[
|
|
666 |
saveBox initialText:'st.img'
|
|
667 |
] ifFalse:[
|
|
668 |
saveBox initialText:ImageName
|
|
669 |
].
|
|
670 |
saveBox showAtPointer
|
|
671 |
!
|
|
672 |
|
|
673 |
exitSmalltalk
|
|
674 |
exitBox isNil ifTrue:[
|
|
675 |
exitBox := EnterBox2 new.
|
|
676 |
exitBox title:(resources at:'save state before exiting ?\\filename for image:') withCRs.
|
11
|
677 |
" exitBox abortText:(resources at:'abort')." "this is the default anyway ..."
|
0
|
678 |
exitBox okText:(resources at:'exit').
|
|
679 |
exitBox okText2:(resources at:'save & exit').
|
|
680 |
].
|
|
681 |
|
|
682 |
exitBox action:[:name | Smalltalk exit].
|
|
683 |
exitBox action2:[:name |
|
|
684 |
ObjectMemory snapShotOn:name.
|
|
685 |
Smalltalk exit
|
|
686 |
].
|
|
687 |
|
11
|
688 |
exitBox initialText:(ObjectMemory nameForSnapshot).
|
0
|
689 |
exitBox showAtPointer
|
|
690 |
! !
|