-1 for 1.2 0 for 1.3 I'm not too keen to switch the semantics for add. Add != replace. If I add 2 euro to your account, then you don't want me to take 2 euro's out of your balance as well.
The name is very clear and has good defined semantics. Also it will make the move from 1.2 to 1.3 less intuitive IMO. Especially if we remove 'replace'. For the 1.2 branch I'd like it to keep the semantics in place that are already there. Can you explain more why it is easier to have 'add or replace' semantics for the add method? Martijn On 7/26/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > Hi all, > > For Wicket 2.0, you don't call add(component) anymore, but instead > create the component with the parent you create. A nice side effect is > that this does 'component replacement' too. > > E.g. > > TextField t1 = new TextField(this, "foo"); > TextField t2 = new TextField(this, "foo"); > > Here, t2 will be the current one, and nothing will happen with t1. > > In Wicket 1.2 (and before), if you do this: > > TextField t1 = new TextField("foo"); > TextField t2 = new TextField("foo"); > add(t1); > add(t2); > > You'll get an exception: "A child with id foo already exists". > > Though this can be helpful for debugging in those rare situations you > mess up, there's not a really that much of a reason to throw an > exception here. Actually, 2.0's behavior is much more convenient, as > you don't have to check whether you should add or replace; you just > call add, and if it exists, it'll be replaced. > > The main reason for wanting to change the semantics is that it'll make > it easier for us to backport components from 2.0 (like I'm doing with > Matej's tree right now). Additionally, it'll be an extra convenience > for all you fancy component developers. > > Can I have some votes on this please? > [ ] sure, go ahead > [ ] no, don't do that, as it will [ fill in the why here ... ] > > Mine's +1 for changing. > > Eelco > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Wicket-develop mailing list > Wicket-develop@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-develop > -- Download Wicket 1.2 now! Write Ajax applications without touching JavaScript! -- http://wicketframework.org ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-develop mailing list Wicket-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-develop