Error - Cannot call property in Global Scope

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Error - Cannot call property in Global Scope

Postby bcusick » Wed Jan 23, 2019 7:46 pm

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
Bob Cusick
bcusick
 
Posts: 1255
Joined: Wed Apr 23, 2003 11:27 pm
Location: Thousand Oaks, CA USA

Re: Error - Cannot call property in Global Scope

Postby jcompagner » Tue Feb 05, 2019 11:53 am

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?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8828
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Error - Cannot call property in Global Scope

Postby bcusick » Fri Feb 08, 2019 11:35 pm

Works in developer
Bob Cusick
bcusick
 
Posts: 1255
Joined: Wed Apr 23, 2003 11:27 pm
Location: Thousand Oaks, CA USA

Re: Error - Cannot call property in Global Scope

Postby jcompagner » Mon Feb 11, 2019 11:52 am

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?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8828
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 8 guests

cron