[BUG] Squeak 2.8 (NT 4.0sp6) IRCConnection>>openConnectionDi
alog ue
Geoffrey Corey
gcorey at redsky.com
Fri Nov 17 17:56:48 UTC 2000
Wow, do I feel stupid posting that code. Actually, this is the corrected
method. The connect button is all you need. I eliminated the code that
checks if the fields have been accepted. Once again I think what has
happened in the original method is textEntryList got garbage collected
before connectButton was pressed.
openConnectionDialogue
"open a dialogue for making new connections"
| dialogue textEntry connectButton y yDelta descMorph textEntryList
|
dialogue _ SystemWindow new.
y _ 0.
yDelta _ 0.8 / 5.
textEntryList _ OrderedCollection new.
#(
'server' server
'port' portAsString
'nick' nick
'username' userName
'full name' fullName
) pairsDo: [ :desc :meth |
descMorph _ PluggableButtonMorph on: self getState: nil
action: nil.
descMorph label: desc.
dialogue addMorph: descMorph frame: (0 at y extent:
0.3 at yDelta).
textEntry _ PluggableTextMorph on: self text: meth accept:
(meth, ':') asSymbol.
textEntry extent: 200 at 20.
textEntry acceptOnCR: true.
dialogue addMorph: textEntry frame: (0.3 at y extent:
0.7 at yDelta).
textEntryList add: textEntry.
y _ y + yDelta.
].
connectButton _ PluggableButtonMorph on: [
self connect
] getState: nil action: #value.
connectButton label: 'connect'.
dialogue addMorph: connectButton frame: (0 at 0.8 extent: 1 at 0.2).
dialogue setLabel: 'connect to an IRC server'.
dialogue openInWorld.
More information about the Squeak-dev
mailing list
|