Hi everyone,
I'm wondering if you think it would be a good idea to
add an alias agrument to the addChild() method?
exmaple:
instead of doing this:
layer1.canvas = layer1.addChild(new DynLayer());
layer1.canvas.cover = layer1.canvas.addChild(new
DynLayer());
we could do this:
layer1.addChild(new DynLayer(),"canvas");
layer1.canvas.addChild(new DynLayer,"cover");
It's much simpler to use and adds a better structure
to the code.
To simply access the cover layer we could do this:
layer1.canvas.cover.setBgColor('#ffcc00');
More complex widget structures could work as follows:
mywidget.addChild(new Button(),"btnUp");
mywidget.addChild(new Button(),"btnDown");
mywidget.addChild(new Button(),"btnClose");
mywidget.addChild(new ScrollBar(),"hscBar");
mywidget.addChild(new ScrollBar(),"vscBar");
mywidget.btnUp.setCaption("up");
What do you think?
--
Raymond Irving
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/[email protected]/