PDA

View Full Version : Help width ashyn & messages



rlupianez
10 Dec 2007, 1:53 PM
Hi,

I'm having problems width ashyn metodology.

I have a the following code:

[CODE]
vGridContacto.on(''rowmousedown'', function(vGridContacto, rowIndex, e) {
var selectedId = ds.data.items[rowIndex].id;
if (vRecordStatus == ''query'' || vRecordStatus == ''new''){
vFormContacto.form.load({url:''...url...?p_n_contacto=''+selectedId, waitMsg:''Cargando...''});
var p_action = Ext.getCmp(''p_action'');
p_action.setValue(''update'');
vRecordStatus = ''query'';
} else {
var vRespuesta = '''';
Ext.Msg.show({
title:''Pregunta'',
msg: ''

devnull
10 Dec 2007, 3:05 PM
Ext.Msg.show returns immediately and continues executing the next code while the message box is displayed, so you have to chain events:
[php]
Ext.Msg.show({
title:''Pregunta'',
msg: ''

rlupianez
10 Dec 2007, 3:30 PM
Yes, I try to reset events there (into de msg), but before this the event finish ok and I'm trying to return false if the user clic cancel.

I think there's no way in this example to do it. Some pause... or timeout or May be I need some help about ashyncro metods?

Thanks