From: Leif W <war...@us...> - 2005-11-13 18:54:14
|
> From: "Anthony Treanor" <ant...@ya...> > Sent: 2005 November 12 Saturday 10:51 > > Ok, I know you use dynapi.document.addChild(child) > to add a child, but I'm trying to understand the code. > I worked out that the document object is created at > the bottom of dyndocument.js. But as far as I can tell > there is no function defined as addChild(child). I've > searched through the api files, looking for addChild, > using my editors search function. There doesn't seem > to be any definition matching this signature. What on > earth is going on? I forget exactly, if it's a DOM thing, defined in most modern browsers, or if it's redefined in the DynAPI. Do a recursive search for "addChild" in all *.js files, and look specifically at the results that create something. Most likely of the form "p.addChild = function...". ./src/api/event.js:126:p.addChild = function(c,alias,inlineID) { ./src/gui/highlighter.js:17:p.addChild=dynapi.functions.Null; ./src/gui/templmngr.js:103:p.addChild = function(c,fld){ The last two are most likely redefined versions, slightly tweaked for use in that particular widget. The first, in event.js, might be where it comes from. Leif |