chrismobile
22 Nov 2011, 7:28 AM
Hello, I tried this and other solutions, but I don't see the alert box showing up.
Am I doing it wrong? I used the sencha-touch-all.js
Regards, Chris.
Ext.application({
name: 'Sencha',
launch: function() {
//this is the Panel we'll be adding below
var aboutPanel = Ext.create('Ext.Panel', {
html: 'About this app'
});
var otherPanel = Ext.create('Ext.Panel', {
html: 'Another Panel'
});
//this is the Panel we'll be adding to
var mainPanel = Ext.create('Ext.Panel', {
fullscreen: true,
layout: 'hbox',
defaults: {
flex: 1
},
items: {
html: 'First Panel',
style: 'background-color: #5E99CC;'
}
});
Ext.Viewport.add(mainPanel);
mainPanel.add(aboutPanel);
mainPanel.add(otherPanel);
aboutPanel.addListener('click', function(){alert('click'), this });
}
});
Am I doing it wrong? I used the sencha-touch-all.js
Regards, Chris.
Ext.application({
name: 'Sencha',
launch: function() {
//this is the Panel we'll be adding below
var aboutPanel = Ext.create('Ext.Panel', {
html: 'About this app'
});
var otherPanel = Ext.create('Ext.Panel', {
html: 'Another Panel'
});
//this is the Panel we'll be adding to
var mainPanel = Ext.create('Ext.Panel', {
fullscreen: true,
layout: 'hbox',
defaults: {
flex: 1
},
items: {
html: 'First Panel',
style: 'background-color: #5E99CC;'
}
});
Ext.Viewport.add(mainPanel);
mainPanel.add(aboutPanel);
mainPanel.add(otherPanel);
aboutPanel.addListener('click', function(){alert('click'), this });
}
});