Apr 21, 2012, 10:25 AM
Show a load mask with a DirectMethod call
Hi All, Here is a Button setup from codebehind as well as the directmethod.
//-----------Setup the event handler on the button----------------------
//---------------The direct method body------------
But for some reason it just doesnt work.
Am i doing the right thing ?
//-----------Setup the event handler on the button----------------------
buttonObject.Listeners.Click.Handler = "#{DirectMethods}.DoSomething();";
//----------End//---------------The direct method body------------
[DirectMethod]
public void DoSomething()
{
MaskConfig cfg = new MaskConfig();
cfg.Msg = "Loading group data...";
cfg.El = "Ext.getBody()";
X.Mask.Show(cfg);
Thread.Sleep(1000); //simulate some work
X.Mask.Hide();
}
//---------ENDBut for some reason it just doesnt work.
Am i doing the right thing ?
Last edited by geoffrey.mcgill; Apr 21, 2012 at 4:47 PM.
Reason: please use [CODE] tags