I know this is a dumb question, but i'll ask anyway as its not the first one to come from me..

In JavaScript, i'm using the ye`old myObject.prototype.method = function() approach to my Components.

I'm extending other objects like:

function Panel() {
        this.init();
}
Panel.prototype = new UIObject();
Panel.prototype.init = function() {
        Debug.trace("Init()","method","Panel");
        
}

Now going by my old Flash + DHTML skills from ages past, Super in this case isn't needed as the moment i go "new UIObject()" on the prototype, it will effectively go and construct that object first, then carry out the Panel's flow?

But.. what happens if i want to append a methods logic? ie in a quasi JAVA approach i could go:

class Panel extends UIObject {
        ...

public function layoutChildren() {
super.layoutChildren();

// I now want to add-in append to the baseUI Nodes that // was constructed within UIObject
var faceLayer = document.createElement("div");
faceLayer.style.background = "gray";


                this.baseUI.appendChild(faceLayer);
        }       
}

etc...

How doth you doith that in JavaScript 1.5 :) any takers? carn you can do it, unload your vast amount of knowledge onto lil ol me and ye shall be rewarded with another of my million dollar "analogies".... (ie "Goin orf like a monkey on crack, climbing a tree..")


--


Regards,
Scott Barnes
-
http://www.mossyblog.com
http://www.bestrates.com.au

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to