Entering code

Trygve Reenskaug trygver at ifi.uio.no
Sat Mar 13 09:02:40 UTC 2004


Aron,
I often find myself in your situation. I then use the spawn command (code 
pane, yellow menu, more...). It opens a new window where I can continue 
work on my half completed code so that I can use the original browser for 
everything else. Be aware that there appears to be a bug: compiling in the 
spawned window fails if the method is a new one.

I use a different approach when developing a complex algorithm: Write the 
method with any known initial statements followed by a 'self halt'. Compile 
and run. Continue developing the code in the debugger. I can now try out 
any new statements in the context of the object with 'do it' and 'print 
it'before committing them as finished code and compiling the growing 
method. Repeat with the halt in a new position. Explore by stepwise execution.

I tend to have at least two browsers open; One for the class I am 
developing and another for library lookup.

Good luck
--Trygve

P.S.
I still seem to end up with many windows. Browsers, hierarchy browsers, 
protocol browsers, method browsers are all useful for their specialities. I 
sorely miss the very old Tectronix browser that elegantly combines them 
all. I believe there is work going on in this direction. If not, I hope to 
find time writing one.


At 13.03.2004 01:31, you 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.
>
>Is there a way to tell Squeak, "look, don't compile this yet, it's not
>ready to go, but please do save the text, I promise I'll come back to it?"
>
>When I'm editing my MATLAB functions, it's perfectly alright for me to be
>bouncing back and fourth between five different functions, all stored in
>different files, each partially finished as I'm writing something.
>
>2) ......
>
>Thanks!
>
>- Aaron


-- 

Trygve Reenskaug      mailto: trygver at ifi.uio.no
Morgedalsvn. 5A       http://heim.ifi.uio.no/~trygver
N-0378 Oslo           Tel: (+47) 22 49 57 27
Norway





More information about the Squeak-dev mailing list