[Seaside] Object new initialize

Philippe Marschall philippe.marschall at gmail.com
Thu Sep 6 16:52:29 UTC 2007


2007/9/6, Conrad Taylor <conradwt at gmail.com>:
> Hi, I was reading the coding conventions which says, "every root class that
> implements #initialize must have a #new on the class side" and I was
> wondering, if the following is implied on subclasses of WAComponent and
> WATask:
>
> class methods:
>
> WRONG
>
> new
>     ^super new initialize
>
> CORRECT
>
> new
>    ^self basicNew initialize
>
>
>
> If the above is correct, is this the case for classes that are subclassed
> from  Object?

The rules there only apply to framework code and if you want your own
code to be portable. If you are happy if your code only works with
dialect X then you can safely ignore them.

Root class means root class in Seaside. So if you subclass Object you
need to implement it but if you subclass WABrush then you don't.

Cheers
Philippe

> Thanks in advance,
>
> -Conrad
>
>
> On 8/31/07, Philippe Marschall <philippe.marschall at gmail.com > wrote:
> > 2007/8/31, Michael Lucas-Smith <mlucas-smith at cincom.com >:
> > > Philippe Marschall wrote:
> > > > 2007/8/30, Michael Lucas-Smith <mlucas-smith at cincom.com>:
> > > >
> > > >> Hello Seasiders,
> > > >>
> > > >> Squeak has the #initialize pattern on Object - but VisualWorks
> doesn't.
> > > >> I'm not sure about Gemstone or Dolphin.
> > > >>
> > > >> Aside from the argument that may be we should have that pattern too-
> in
> > > >> the interest of code portability, what is the best approach here.
> > > >>
> > > >
> > > > Acutally this issue like many others is covered in the Seaside coding
> > > > conventions:
> > > > http://www.seaside.st/community/conventions
> > > >
> > > > I just simply forgot is in this case. Seaside2.8a1-pmm.463 should fix
> this.
> > > >
> > > Thanks. I was a little surprised, as I hadn't seen this previously. I
> > > figured if it were a common problem, it would have been happening
> > > everywhere. Good to see it's covered in the conventions :)
> >
> > That's mostly thanks to Michel Bany. For a long time he helped
> > increase the portability by making us aware of our "sins" and fixing
> > unportable stuff.
> >
> > Cheers
> > Philippe
> >
> > > Michael
> > > _______________________________________________
> > > Seaside mailing list
> > > Seaside at lists.squeakfoundation.org
> > >
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> > >
> > _______________________________________________
> > Seaside mailing list
> > Seaside at lists.squeakfoundation .org
> >
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
>
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>


More information about the seaside mailing list