[BUG][DUMB USER] Refactoring Browser
David Farber
dfarber at numenor.com
Fri Oct 25 22:59:50 UTC 2002
[BUG]
I've got the following method that I'd like to break up by applying Extract Method.
renderOn: html
"Extract to 'self initMessage.'"
"Note: 'message' is an instance variable."
| mboxStream |
[mboxStream := FileStream fileNamed: 'HOS.mbx'.
message := RFC822Message fromMBOX: mboxStream.]
ensure: [mboxStream close].
"Extract to 'self renderHeadersOn: html.'"
html bold: [html text: 'Date: ']; text: (message getHeader: 'Date'); break.
html bold: [html text: 'To: ']; text: (message getHeader: 'To'); break.
html bold: [html text: 'From: ']; text: (message getHeader: 'From'); break.
html bold: [html text: 'Subject: ']; text: (message getHeader: 'Subject'); break.
"Extract to 'self renderBodyOn: html.'"
html preformatted: message body asHtml2.
When I try to extract the first block, I get an error: "Cannot extract assignment if read before written." This doesn't make sense as I don't see anything that is getting read before written.
[DUMB USER]
When I try to extract the second or third block, I get the Extract Method dialog box. It says 'Selector editor' in the title bar. There is a line edit control at the top of the dialog box, then a list below that (with two buttons off to the side) and then a second line edit control and then a pair of 'OK' and 'Cancel' buttons below that.
It was not at all obvious that I had to type in the selector into the top line edit control and /then/ hit Alt-s to accept the selector. For the longest time I just kept trying to hit 'OK' but all the dialog did was flash. Is there some way we could make this more obvious? Is there any documentation for RB? I looked both at UIUC and on the Squeak Wiki and I couldn't find any real documentation.
(Nitpicking aside, I am /so/ happy to see the RB up and running [or atleast limping] in Squeak. Thanks to all who have worked to make this happen!!)
david
--
David Farber
dfarber at numenor.com
More information about the Squeak-dev
mailing list
|