PDA

View Full Version : [NOREPRO] [2.1.0] Ext.Msg.alert: no message in iOS package



tino7_03
21 Nov 2012, 12:26 PM
I have used Ext.Msg.alert in my sencha 2.1.0 app and it works until I use it in browser. I'm using Sencha Architect and after iOS packaging when I try my app on device (or simulator) no messagges appear on the display...

mitchellsimoens
21 Nov 2012, 2:58 PM
This works for me:


Ext.Msg.alert('Hello', 'Hi');

tino7_03
24 Nov 2012, 12:24 AM
I'm using this function in my app:


alertPopup: function(msg, caption, fnCallback) {
if(caption===undefined||caption===null){
caption="Messaggio";
}


if(fnCallback===undefined||fnCallback===null){
fnCallback=Ext.emptyFn;
}
msg=this.getItaString(msg);
Ext.Msg.alert(caption, msg, fnCallback());


},


getItaString: function(string) {
string = string.replace(/è/g,'e\'');
string = string.replace(/à/g,'a\'');
string = string.replace(/ù/g,'u\'');
string = string.replace(/ì/g,'i\'');
string = string.replace(/é/g,'e\'');
string = string.replace(/ò/g,'o\'');
return string;
},


and it doesn't work in iOS native code and it works in Chrome

mitchellsimoens
24 Nov 2012, 5:54 AM
You probably need this instead:


Ext.Msg.alert(caption, msg, fnCallback);

You had () on fnCallback which was executing it right away not when the user would press Ok.

tino7_03
24 Nov 2012, 11:22 AM
I've changed my code (without "()"), but the problem is present again...

I've also used your example
Ext.Msg.alert('Hello', 'Hi');
but no message on display....