Dmoney
30 Jan 2011, 9:20 AM
I'm having trouble getting the namespace to work in sencha touch. I have searched the forums but I havent found an answer or the examples I have found are too complicated for my current abilities.
I have a namespace called maps with my map panel code in it like this :
Ext.ns('maps');
maps.mapPanel = new Ext.Panel({
fullscreen: true,
items: [{
xtype: 'map'
title: 'Map',
useCurrentLocation: true,
mapOptions: {
zoom: 12
}
}]
});
and I am trying to use maps.mapPanel as a card in my tabPanel like this
{
title: 'Search',
iconCls: 'search',
cls: 'card card5',
items: maps.mapPanel
}
Which isn't working. if I move mapPanel into the onReady of my main application file it works fine. Can someone tell me how you create a panel in a separate namespace?
I have a namespace called maps with my map panel code in it like this :
Ext.ns('maps');
maps.mapPanel = new Ext.Panel({
fullscreen: true,
items: [{
xtype: 'map'
title: 'Map',
useCurrentLocation: true,
mapOptions: {
zoom: 12
}
}]
});
and I am trying to use maps.mapPanel as a card in my tabPanel like this
{
title: 'Search',
iconCls: 'search',
cls: 'card card5',
items: maps.mapPanel
}
Which isn't working. if I move mapPanel into the onReady of my main application file it works fine. Can someone tell me how you create a panel in a separate namespace?