Entering code
Hans-Martin Mosner
hmm at heeg.de
Sat Mar 13 06:47:53 UTC 2004
Aaron Lanterman wrote:
>Hi there,
>
>I'm currently working on writing my first real Smalltalk program, "real"
>as in a program to solve an actual problem I need solved, and not a toy
>example just to get used to the language.
>
>Two quick questions:
>
>1) One thing is driving me completely nuts: Sometimes I'll be writing a
>method, and would like to leave it half finished - maybe making reference
>to a new instance variable I now realize I need - look around at some
>other stuff, and then go back to it. But when I do that, it asks if I want
>to save changes, and it forces me to accept it in order to save the
>changes, but it will only accept it if it's a real working piece of code.
>To work around this problem I generally have a lot of browser windows
>open.
>
That's the right way to do it - leave a browser window open, define the
inst var in another window, and come back to the first one.
One well-kept secret about the Smalltalk environment is that by making
some ways of doing things difficult, it tells you that these things are
not intended to be done that way :-)
If your methods are so complex that you need several open browser
windows to keep unfinished methods which don't compile yet, your methods
are *too* complex.
You should also note that only unbindable variable references and
straight syntax errors prevent methods from being compiled. Adding an
inst var is pretty quick, so you should do it right on the spot.
Accepting a method with syntax errors is never good...
Cheers,
Hans-Martin
More information about the Squeak-dev
mailing list
|