Hi Andy/Blair,
If you try to use the Window menu in the system folder after using
sockets, the following walkback occurs.
8:55:15 PM, Sunday, 21 April 2002: 'WinAsyncSocket does not understand
#caption'
WinAsyncSocket(Object)>>doesNotUnderstand:
[] in
RefactoringSmalltalkSystem(SmalltalkSystem)>>populateWindowMenu:withShells:ofClasses:
OrderedCollection>>do:
[] in
RefactoringSmalltalkSystem(SmalltalkSystem)>>populateWindowMenu:withShells:ofClasses:
SortedCollection(OrderedCollection)>>do:
RefactoringSmalltalkSystem(SmalltalkSystem)>>populateWindowMenu:withShells:ofClasses:
RefactoringSmalltalkSystem(SmalltalkSystem)>>populateWindowMenu:
RefactoringSmalltalkSystem(SmalltalkSystem)>>onAboutToDisplayMenu:
Menu>>queryAllAlong:
Menu>>queryAllFromView:
< ... elided ...>
Obvious fix attached that keeps the WinAsyncSocket out of the menu.
BTW: Dragging a method to a Workspace is not an undo-able action.
-------------------------
Antony Blakey
mailto:
[hidden email]
Linkuistics Pty Ltd
Adelaide, South Australia
!SmalltalkSystem methodsFor!
populateWindowMenu: windowMenu
"Private - Populate the open windows menu"
| openShells allOpenClasses toolClasses otherClasses systemShell |
windowMenu clear.
openShells := SessionManager inputState topLevelWindows collect: [:each | each presenter].
allOpenClasses := openShells asSet collect: [:each | each class].
toolClasses := allOpenClasses select: [:each | self isRegisteredTool: each].
otherClasses := allOpenClasses difference: toolClasses.
otherClasses remove: WinAsyncSocket ifAbsent: [].
"System shell is always first"
toolClasses remove: self systemFolderClass.
systemShell := openShells detect: [:each | each class == self systemFolderClass].
windowMenu
addCommand: (Message selector: #showShellWithHandle: argument: systemShell view handle)
description: 'System Folder'
image: systemShell icon.
"Now tools"
self
populateWindowMenu: windowMenu
withShells: openShells
ofClasses: toolClasses.
"Now others"
self
populateWindowMenu: windowMenu
withShells: openShells
ofClasses: otherClasses! !
!SmalltalkSystem categoriesFor: #populateWindowMenu:!operations!private! !