Contributions
Pass Uniface-application object between units
Hi, I have a working (windows application) uniface-test, and now trying to divide this up into re-usable parts (units). So 1 of the first things I need to do is open the application and pass it on from one unit to another. When I run tis I get the following message: "Unable to find the object MDIClient. See Details for additional information" Anyone an idea what is going wrong here? Here are my 3 units: Unit 1 = start unit: var unitTZISAPP = require("TZISAPP"); var unitTZISAPP_LOGON = require("TZISAPP_LOGON"); function CallTestObjects(){ let TZisApp = unitTZISAPP.letZisApp(); let returnvalue = unitTZISAPP_LOGON.TZisAppLogOn(TZisApp); Log.Message(returnvalue);} Unit 2 called TZISAPP: module.exports.letZisApp = letTZISAPP; function letTZISAPP(){ //Start application return TestedApps.Tzis.Run();} Unit 3 called TZISAPP_LOGON: module.exports.TZisAppLogOn = TZISAPPLogOn; function TZISAPPLogOn(TZisApp){ let wndUniMDIFormLogOn = TZisApp.MDIClient.wndUniMDIForm; => ERROR ON THIS LINE let uViewPortLogOn = wndUniMDIFormLogOn.uviewport; let uniCanvasLogOn = uViewPortLogOn.UniCanvas; let editLogOnUserName = uniCanvasLogOn.Edit; editLogOnUserName.Drag(46, 8, -86, -1); editLogOnUserName.SetText("x047593"); let editLogOnPassword = uniCanvasLogOn.Edit2; editLogOnPassword.Click(30, 11); editLogOnPassword.SetText(Project.Variables.Password1); let btnOKLogOn = uniCanvasLogOn.OwiCmdButton.btnOk; btnOKLogOn.ClickButton(); return 1;}754Views0likes2Comments