@magic-xpa/engine 4.1000.0-dev4100.393 → 4.1000.0-dev4100.395

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12012,7 +12012,7 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
12012
12012
  Exp_params = new Array(nArgs);
12013
12013
  for (j = 0; j < nArgs; j++)
12014
12014
  Exp_params[nArgs - 1 - j] = valStack.pop();
12015
- this.eval_op_CallJS(this.ExpTask, valStack.pop().StrVal, Exp_params, resVal);
12015
+ yield this.eval_op_CallJS(this.ExpTask, valStack.pop().StrVal, Exp_params, resVal);
12016
12016
  }
12017
12017
  break;
12018
12018
  case ExpressionInterface.EXP_OP_SET_COOKIE:
@@ -14431,18 +14431,24 @@ class ExpressionEvaluator extends GuiExpressionEvaluator {
14431
14431
  });
14432
14432
  }
14433
14433
  eval_op_CallJS(task, methodName, expVal, resVal) {
14434
- resVal.Attr = StorageAttribute.ALPHA;
14435
- resVal.StrVal = '';
14436
- if (task.isMainProg()) {
14437
- console.error("CallJS cannot be used in Main Program");
14438
- return;
14439
- }
14440
- let form = task.getForm();
14441
- let args = this.params2arguments(expVal, 0, expVal.length);
14442
- if (!isNullOrUndefined(args)) {
14443
- resVal.StrVal = Commands.addCallJS(form, form.UniqueName, methodName, args);
14434
+ return __awaiter(this, void 0, void 0, function* () {
14444
14435
  resVal.Attr = StorageAttribute.ALPHA;
14445
- }
14436
+ resVal.StrVal = '';
14437
+ if (task.isMainProg()) {
14438
+ console.error("CallJS cannot be used in Main Program");
14439
+ return;
14440
+ }
14441
+ let form = task.getForm();
14442
+ let args = this.params2arguments(expVal, 0, expVal.length);
14443
+ if (!isNullOrUndefined(args)) {
14444
+ if (task.isFirstRecordCycle()) {
14445
+ Commands.invoke();
14446
+ yield Thread.Sleep(10);
14447
+ }
14448
+ resVal.StrVal = Commands.addCallJS(form, form.UniqueName, methodName, args);
14449
+ resVal.Attr = StorageAttribute.ALPHA;
14450
+ }
14451
+ });
14446
14452
  }
14447
14453
  eval_op_set_cookie(cookieName, expVal, resVal) {
14448
14454
  resVal.Attr = StorageAttribute.BOOLEAN;
@@ -30356,7 +30362,7 @@ class CommandsTable {
30356
30362
  }
30357
30363
  }
30358
30364
 
30359
- let CurrentClientVersion = '4.1000.0-dev4100.393';
30365
+ let CurrentClientVersion = '4.1000.0-dev4100.395';
30360
30366
 
30361
30367
  class ClientManager {
30362
30368
  static get Instance() {