[Seaside-dev] basicNew

Randal L. Schwartz merlyn at stonehenge.com
Mon Sep 29 18:32:36 UTC 2008


>>>>> "Avi" == Avi Bryant <avi at dabbledb.com> writes:

Avi> initializeWithX: xNumber y: yNumber
Avi>   super initialize.
Avi>   x := xNumber.
Avi>   y := yNumber.

It's bad form to use "super" with a method name that isn't your own.  In fact,
I think it's an error that Smalltalk allows you to do it.  It breaks
subclassing, because there's *no way* a subclass could ever override that
"initialize" method now.

Change "super" to "self" in this method, and I'd be happy.  If the current
class has no initialize, it's the same execution flow.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion


More information about the seaside-dev mailing list