[Newbies] Re: Easy way to override a method?

Tim M 365nice at gmail.com
Sat May 17 12:26:50 UTC 2008


Hi Herbert,

> if I don't misunderstand you, you just redefine it in your subclass?

Yes but its a nuisance to copy the method signature, click on the class below, 
click on a method (or the as yes undefined category), and then paste the 
signature and then enter by override.

I was hoping that there was something like in dolphin - browse my subclass 
but enable show inherited methods - select the inehrited method, right click 
and pick Refactoring | Override - this then does then creates me a template 
that overrides.

> RB uses the shift key to copy a method into another class instead of
> moving it. Other refactorings are push up, push down moving the method
> down to every subclass.

The shift key wasn't one I thought of - that is a reasonable workaround if 
a bit mousy. Maybe if I get better at Squeak I will work out how to add a 
keyboard shortcut.

Thanks for the tips.

Tim





More information about the Beginners mailing list