Page 1 of 1

Error - Cannot call property in Global Scope

PostPosted: Wed Jan 23, 2019 7:46 pm
by bcusick
Getting error:
Cannot call property downloadPublications in GlobalScope [ ... all global objects here ... ] It is not a function, it is "object".

It's clearly a FUNCTION:

Code: Select all
/**
* @param {String} searchStr - what to search by
* @param {String} [newRecLogReason] - for new pub creation
*
* @AllowToRunInFind
* @properties={typeid:24,uuid:"61299336-0241-4456-8DBA-56F82DA002E5"}
*/
function downloadPublications(searchStr,newRecLogReason) {
   
   var isSingle = 0;

        -------- other code here -----------
}
   



This happens in SMART CLIENT ONLY - not WebClient.

The code that makes the call is very simple:

Code: Select all
try{
      
      //get the pub info
      var x = scopes.globals.downloadPublications(searchStr,reason);
      
      
   } catch(e) {
      
      application.output("ERROR: " + e.message + "\n" + e.stack, LOGGINGLEVEL.ERROR);
      scopes.globals.DIALOGS.showErrorDialog("ERROR","ERROR: " + e.message + "\n" + e.stack,"OK")
      
   } finally {
   ---------
}


Any ideas???




Servoy version 7.4.10 -releaseNumber 2049
Port used by RMI Registry: 1100
Repository version 44

JVM Information
java.vm.name=Java HotSpot(TM) Client VM
java.version=1.8.0_171
java.vm.info=mixed mode
java.vm.vendor=Oracle Corporation

Operating System Information
os.name=Windows Server 2008
os.version=6.0
os.arch=x86

Re: Error - Cannot call property in Global Scope

PostPosted: Tue Feb 05, 2019 11:53 am
by jcompagner
that is really weird, seems to be quite straightforward code that is done many times in solutions..
so no idea what is so special about that and why only in smart, is that also the case when running from developer?

Re: Error - Cannot call property in Global Scope

PostPosted: Fri Feb 08, 2019 11:35 pm
by bcusick
Works in developer

Re: Error - Cannot call property in Global Scope

PostPosted: Mon Feb 11, 2019 11:52 am
by jcompagner
my feeling is that the export is doing wrong somehow
So really exporting and importing it once in a clean application server install with a clean repository, does it then behave the same?