Re: ChildChange vs ChildAdded, ChildRemoved

Charles Goodwin <[email protected]> Mon, 12 Apr 2004 10:15:18 +0000
Newsgroups gmane.comp.java.xwt.core
Organization XWT Foundation
Message-ID <[email protected]>
On Mon, 2004-04-12 at 01:12 -0700, Adam Megacz wrote:
> How about numchildren++=function()?

Same issue as ChildChange.  That would have to be almost always written
with a check against the numchildren clause:

numchildren ++= function(v) {
    if (v > cascade) { /* gained someone */ }
    else { /* lost someone */
}

Which is no different from:

ChildChange ++= function(v) {
    if (indexof(v) > -1) { /* v was added */ }
    else { /* v was removed */ }
}

Which we're saying may as well be:

ChildAdded ++= function(v) { /* obvious */ }
ChildRemoved ++= function(v) { /* obvious */ }
-- 
- Charlie

Charles Goodwin <[email protected]>
Online @ www.charlietech.com