This is an awsome library for building UI widgets. I tripped a little the first time I tried to use the library to build a moderatly complex widget.
I couldn't figure out how the "layout" template content is set in the Active.Controls.Grid Object.
I was trying to use the Widget library to build a custom widget that would behave like the right click context menu, with a title, and list of selectable menu options.
Looking at Active.Controls.Grid, I think I follow the template Model/Object hierachy well enough, but I can't decipher how the layout, row, column, and item templates are put together. I am also a little fuzzy about how they are populated from the model object.
Could you explain this stuff to me, or at least tell me which parts of the code I should study more thoroughly.
Here is what I have so far. I know I should probably use a List template for the context menu items, but I was trying to crawl before walking.
Your input is greatly appreciated!
obj.defineTemplate("layout", new Active.HTML.DIV);
obj.defineTemplate("header", new Active.HTML.DIV);
obj.defineTemplate("data", new Active.Templates.List);
obj.defineTemplate("row", new Active.System.Template);