the power of the wiki is that anyone can contribute :)
-igor On 3/9/07, Bruno Borges <[EMAIL PROTECTED]> wrote:
Cool Igor... Now I see the problem and what's coming next :) PS: this explanation should be wiked !! =) []'s On 3/9/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > we are trying to consolidate the methods. we have a bunch of > internalOnAttach/internalAttach/attach/onattach methods. its a big mess. > what this refactor does is give you one method you can override - > onattach() > but forces the call to super. > > doing it like it has been done doesnt work. users assume onattach() is a > template method, they can override and not have to call super - but this > fails if you go more then one method deep! > > if i create a custom component and do something in onattach(), then the > user > subclasses it and they do something in onattach() and dont bother to call > super() they will break my functionality. my only choice of action is to > make onattach() final in my custom component and provide yet another > template for the user, onattach2() ? this just doesnt scale. better to > have > a simple and clear contract - onattach and ondetach always require the > call > to super. > > unfortunately the only way to do that at this point _and_ keep the same > method names is to do what i did. > > OT there is a jsr for software defect annotations that includes something > like @MustCallSuper (forget what its called), that combined with an apt > builder in an ide will make these kinds of contracts very easy to enforce > at > compile time. we are just not there just yet. > > -igor > > > On 3/9/07, Bruno Borges <[EMAIL PROTECTED]> wrote: > > > > I want to make a comment about the onAttach/Detach refactor: > > > > This really can't be done without breaking current overridden codes? > > > > Isn't possible to convert onAttach to final onBeforeAttach, and let > > onAttach > > empty so users can override? The same for detach... > > > > []'s > > > > On 3/9/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > > > > > he forgot the onattach/detach refactor which will break a lot of > clients > > > in > > > runtime if they overrode onattach/detach and didnt call super(). > > > > > > so dont worry. > > > > > > -igor > > > > > > > > > On 3/9/07, Nick Heudecker <[EMAIL PROTECTED]> wrote: > > > > > > > > > Right now, the differences between 2.0 > > > > > and 1.3 are also models, validators and generics. I think that's > it. > > > > > > > > > > > > Oh, that's all? For a second I was worried. :) > > > > > > > > > > > > -- > > > > Nick Heudecker > > > > Professional Wicket Training & Consulting > > > > http://www.systemmobile.com > > > > > > > > Eventful - Intelligent Event Management > > > > http://www.eventfulhq.com > > > > > > > > > > > > > > > -- > > Bruno Borges > > Summa Technologies Inc. > > www.summa-tech.com > > (48) 8404-1300 > > (11) 3055-2060 > > > -- Bruno Borges Summa Technologies Inc. www.summa-tech.com (48) 8404-1300 (11) 3055-2060
