PDA

View Full Version : templates, items, dockedItems and layout questions



jep
30 Sep 2010, 2:13 PM
I'm just trying to understand how all the big concepts like templates, items, docked items and layouts work and which work in tandem and which are completely separate things. As far as I can find, there's no documentation teaching these things, but rather only documentation on those pieces in isolation. I'm trying to get the "big picture" (and can't wait for the Creating Apps in Sencha Touch book to come out!).

So I think I'm beginning to understand that the template/data/update system are for the most part completely separate from the items/dockedItems/layout system (with the exception that update can be used to update the html content in both cases).

If I have a component that I've set a template for, I can't use "layout" anymore, as it doesn't apply to it, right?

And there's no way to use the template system to dynamically create Ext.Button/Ext.Panel/etc. classes as children, right? I mean, short of making "fake" ones and styling them so they look the same. Instead, you can only really do this via items, correct? And the parent of these items uses the layout config setting to figure out how to arrange its children, also correct?

The things I'm finding most difficult about using Sencha Touch are these larger concepts, especially since javascript is not a strongly typed language. I wind up in trouble because something like an Ext.Panel will have properties for all these things, but you'll just get weird behaviors or exceptions when you try to use ones together that you shouldn't. Or other times where you'll have a component and some of its properties no longer actually have any use because they don't apply to that subclass.

Thanks in advance.

evant
30 Sep 2010, 3:59 PM
So I think I'm beginning to understand that the template/data/update system are for the most part completely separate from the items/dockedItems/layout system


Correct, you use items for creating lists of components.