Page 1 of 1

App with generic services will not run with new v2.0 libraries

Posted: Tue Feb 11, 2014 10:27 pm
by Adam Garbinski

Hello,
After switching to v2.0 libraries version in Appery Builder my app stopped working. It throws this errors at the console:

Uncaught ReferenceError: $t is not defined genericServiceArttableQuery.js:1
Uncaught ReferenceError: $t is not defined genericServiceGroupQuery.js:1
Uncaught ReferenceError: $t is not defined genericServiceGrouptreeQuery.js:1
Uncaught ReferenceError: $t is not defined genericFavouritesQuery.js:1
Uncaught TypeError: undefined is not a function service.js:46
Uncaught TypeError: Cannot set property 'serviceLoaderOptions' of undefined appery.js:1352

All these errors are generated by generic JS services (based on Appery tutorial examples). This is where it comes from:

$t.genericServiceArttableQuery = $t.createClass(null, {
// This is Generic Service custom JS - Arttable
init : function(requestOptions) {
this.__requestOptions = $.extend({}, requestOptions);
},

Code: Select all

 process : function(settings) { 

It is just the fragment of the generic service code, as you can see there is a problematic "$t" at the beginning of it.

Can you help me fix it please?


App with generic services will not run with new v2.0 libraries

Posted: Tue Feb 11, 2014 10:51 pm
by Alena Prykhodko

Hello Adam,

Please share your app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a, tell us its name and steps to test.


App with generic services will not run with new v2.0 libraries

Posted: Tue Feb 11, 2014 11:01 pm
by Adam Garbinski

Hello Alena,
The app is already being shared with Appery support. It is called 3MC. To reproduce simply try to launch it via web tester and check console.


App with generic services will not run with new v2.0 libraries

Posted: Tue Feb 11, 2014 11:34 pm
by Alena Prykhodko

Adam, thank you. We need some time to figure out what may cause this. We'll let you know asap.


App with generic services will not run with new v2.0 libraries

Posted: Wed Feb 12, 2014 11:54 am
by Maryna Brodina

Hello! In JS files with generic service implementation replace $t with Appery.


App with generic services will not run with new v2.0 libraries

Posted: Wed Feb 12, 2014 1:55 pm
by Adam Garbinski

Hello Maryna. That fixed issue with opening app. Thanks.
However, once I was able to open my app I could see that the styling is gone:

This is how it looks with version 1.2 of the library:

Image

and this is how it looks with 2.0 library:

Image

Is something wrong with the template? (created with Jquery Mobile Theme Roller) Can I fix it somehow?


App with generic services will not run with new v2.0 libraries

Posted: Wed Feb 12, 2014 3:17 pm
by Maryna Brodina

For what jqm version did you create template? In 2.0 libraries version there is jqm 1.4 - so you need to edit theme.


App with generic services will not run with new v2.0 libraries

Posted: Wed Feb 12, 2014 11:04 pm
by Adam Garbinski

Ok. I get it now... Thanks Maryna. I could possibly recreate the theme in JQM Themeroller but according to what is written here:

http://jquerymobile.com/upgrade-guide...

there is plenty of more nasty monsters waiting around the corner...

So I guess I will stick to 1.3.2 JQM.

Cheers,
Adam