View Full Version : Kitchen Sink: how does nav panel get shown?

14 Sep 2010, 7:23 AM
Hi, I'm going through the Ktichen Sink code to try and learn Sencha Touch. In index.js, you see the following code:

if (!Ext.platform.isPhone && Ext.orientation == 'landscape') {
else if (Ext.platform.isPhone) {
this.items = this.items || [];
It looks like this code causes the nav panel to be rendered (containing cells for "User Interface", "Animation", etc.) by either adding it to the dockedItems array or the items array of the parent Panel.

However, if I delete this code everything still works fine (i.e., the nav panel is still displayed). Why is that? In trying to understand how ST works, it's confusing to see that the nav panel is shown even if you *don't* added it to dockedItems or items.


14 Sep 2010, 8:05 AM
There are a lot of cool techniques used in the Kitchen Sink app that I think I have a handle on but it would be helpful if someone at Sencha could put together a detailed discussion of the index.js file for this app.

14 Sep 2010, 8:08 AM
Or comment the steps used in the Kitchen Sink. It should automatically be a "debugged" version since it's your showcase...

14 Sep 2010, 10:48 AM
We will be putting some more work into the UniversalUI class to make it more generic and easy to use for other applications.