Missing unstored calculations - after 357 to 410 import

Hi Servoyans

Installed 4.1.0 to test with some client solutions and running into problem that for some Database tables the unstored calculations are not available.

Have checked in …/servoy_workspace and all the tables have a file xxx_calculations.js but about half of them can’t be accessed through the Eclipse ‘Calculations’ tab - just shows a folder icon with the DB connection name. The missing calcs all appear in the ‘Problems’ tab and of course it’s making a mess of the GUI elements that are rely on these unstored calcs.

Have deleted 4.1.0 and workspace then re-installed, imported, checked-out, activated again but same result.

Couldn’t find anything on Forum but has anyone else seen this or have any suggestions?

Mac OSX 10.5.4
Servoy: 4.1.0 - build 651

This seems like a deserialization problem. In workspace\solution\datasources\server you should have mytable.obj and mytable dir with mytable_calculations.js . If these files are correct your calculations should show up. Maybe something is missing or wrong? Does the problems view contain any error to indicate what happens ?

Hi Laurian

Thanks for looking at this.

I do have contacts.obj and a directory with contacts_calculations.obj and they seem fine in a text editor. Directory also contains seperate .obj files for each Aggregate calculation.

Problems view shows a bunch of ‘Errors’ but they are just ‘;’ in wrong place and a lot of ‘Warnings’ in format:

Element ‘company_or_name’ in form contacts__2 has dataprovider ‘company_or_name_c’ that doesn’t exist. Cognition_3/forms/contacts__2 company_or_name.obj Cognition_3/forms/contacts__2/company_or_name.obj 1229346811451 10112

When I open the files in a text-editor - contacts_calculations.obj file which does not show and the dashboard_calculations.obj which does show appear to have the same format. Again the contacts.obj and dashboard.obj files have same data types.

Is there any way of manually creating the links - no problem doing this if it’s a one-off glitch.

Regards

is it possible to get a zip/7zip dump of that workspace? (with the servoy.properties)

Sure - standby

Hi Graham,

Some calculation files contain syntax errors. These files cannot be parsed correctly by javascript parser and the calculations from that file won’t be created. As soon as i solved the errors from contacts_calculations.js all its calculations showed up in table editor.

Regards, Laurian

Thanks Laurian

Is there any way to see which are problem calculations? This solution started in SV 2.2.7 and is running in 3.5.7 without issues. I’ve opened up the contacts_calculation.js file in TextEditor, Coda etc and nothing appears to be flagged. I can see plenty of missing ‘;’ that were not a problem in previous releases but wonder if there is a more scientific way.

Thanks again.

Indeed the “;” is the problem, you can check the error markers which are on file contacts_calculations.js , double click the marker to open the js file. On the left you should see a red image for every error in that file. In 4.0 the javascript engine has changed , it seems it does not like "if (condition) {instruction}; else " , the “;” should be deleted.

OK that’s really useful.

Many thanks