/ Published in: ActionScript
Expand |
Embed | Plain Text
// following example comes from a drag drop implementation in a grid, which // requires a YES/NO answer on a messagebox, but we would like to add some // extra's as a parameter to the function where we test the answer /*-------------------------------------------------------------------------- * Drag and Drop event Handlers *-------------------------------------------------------------------------*/ ProcessDropping : function (ddSource, data, obj) { Ext.Msg.show({ title : zap.getLang('plan', 'delete_event','Ereignis zufügen?'), msg : zap.getLang('plan', 'q_delete_event','Soll dieses Ereignis zugefügt werden?'), buttons : Ext.Msg.YESNO, config : { obj : obj, myname : 'nobody' }, fn : this.ProcessDroppingContinue, icon : Ext.MessageBox.QUESTION }); }, ProcessDroppingContinue : function (btn, text, opt ) { var obj = opt.config.obj; // = obj from the parameters of the other routine var cowboy = opt.config.myname // = nobody if (btn === 'yes' ) { // do something very nice here } }
You need to login to post a comment.
