New Widget - how to start ?
I'm hoping that someone with some AAW experience can help me and point out if I am doing anything/approaching anything wrong :)
I need to write a sidebar (Windows style) widget.
I should say here that I am running a licenced copy of AW2.0
The first thing I believe I need is to subclass AW.System.Control to make my own control - say AW.Sidebar.Control
To allow AW.Sidebar to have its own namespace I have included :
if (!AW.Sidebar) {AW.Sidebar = {}}
in the namespace.js file
From this control I can 'hang' the templates and models etx that I will need to make my sidebar. Does this sound correct ? My problem is that if I try the following in my HTMl file:
var sidePane = new AW.UI.Sidebar;
I am told AW.UI.Sidebar is not an object. Here is my sidebar control.jas file in its basic shell form:
<-------------------
AW.Sidebar.Control = AW.System.Control.subclass() ;
AW.Sidebar.Control.create = function(){
var obj = this.prototype;
obj.defineTemplate("group", new AW.Tree.Group);
obj.setItemTemplate(new AW.Tree.Item);
};
AW.UI.Sidebar = AW.Sidebar.Control;
--->
What fundemental think of creating you own widgets am I missing?
Hopefully I can get this to work - and offer it back to the Friends of AW ????
I need to write a sidebar (Windows style) widget.
I should say here that I am running a licenced copy of AW2.0
The first thing I believe I need is to subclass AW.System.Control to make my own control - say AW.Sidebar.Control
To allow AW.Sidebar to have its own namespace I have included :
if (!AW.Sidebar) {AW.Sidebar = {}}
in the namespace.js file
From this control I can 'hang' the templates and models etx that I will need to make my sidebar. Does this sound correct ? My problem is that if I try the following in my HTMl file:
var sidePane = new AW.UI.Sidebar;
I am told AW.UI.Sidebar is not an object. Here is my sidebar control.jas file in its basic shell form:
<-------------------
AW.Sidebar.Control = AW.System.Control.subclass() ;
AW.Sidebar.Control.create = function(){
var obj = this.prototype;
obj.defineTemplate("group", new AW.Tree.Group);
obj.setItemTemplate(new AW.Tree.Item);
};
AW.UI.Sidebar = AW.Sidebar.Control;
--->
What fundemental think of creating you own widgets am I missing?
Hopefully I can get this to work - and offer it back to the Friends of AW ????
Yasdnil
February 20,