« Return to Thread: Easy way to override a method?

Re: Easy way to override a method?

by Tim M-4 :: Rate this Message:

Reply to Author | View in Thread

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



_______________________________________________
Beginners mailing list
Beginners@...
http://lists.squeakfoundation.org/mailman/listinfo/beginners

 « Return to Thread: Easy way to override a method?

LightInTheBox - Buy quality products at wholesale price