[BUG][DUMB USER] Refactoring Browser

danielv at netvision.net.il danielv at netvision.net.il
Fri Oct 25 22:49:29 UTC 2002


Hi David.
I'd like to reproduce this so I can explore and maybe understand what's
going on. Can you please give me a recipe that reproduces, starting with
a fresh image, ending with the class for this code?

About the naming dialog, actually, I'd like it to auto accept whatever
is typed in the line above, and lock up the display line, so it can't be
edited by mistake, but there's much I don't know about Morphic, and
those two are part of it. I'd be glad to improve that, so if anyone has
hints, snippets...

For now, maybe I'll just add balloon help (I don't know many tricks, but
I'm persistent with those I do ;-). Suggestions how it should go?

BTW, another request, if you could run the RB tests? they're green for
me, but Alex reported failures that I can't reproduce. I'd feel better
if I knew they run for other people, too.

Daniel

David Farber <dfarber at numenor.com> wrote:
> 
> [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