Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

Transition from Old Libaries to new 2.1 libaries - Code breakage...

Evening,

I switched my project from the 2.0 libraries to the 2.1 libraries - so that I could get the 64 bit support... mandated by the IOS Store in about 11 days.

Code previously working .... breaks in a .js script called 'component-manager.js'....

here's the code... :

Code: Select all

     function SelectMenuFacade() { 
     } 

     SelectMenuFacade.prototype = Object.create(Facade.prototype, { 
         _properties: { writable: false, configurable: false, value: ["visible", "selectedMenuItem"] } 
     }); 
     SelectMenuFacade.prototype.__change_ids = function (c, id_mod) { 
         var select = SelectMenuFacade.prototype.unwrapper(c).clone(); 
         select.attr("dsrefid", select.attr("dsid")).attr("dsid", select.attr("dsid") + "_" + id_mod); 
         select.attr("id", select.attr("id") + "_" + id_mod).attr("_idx", "_" + id_mod); 
         c.children().children("select").children().each(function () { 
             var selectitemFacade = findFacade($(this)); 
             $(this).replaceWith(selectitemFacade.clone($(this), id_mod)); 
         }); 
         Facade.prototype.set_children(select, c.children().children("select").children()); 
         Facade.prototype.set_children(c, select); 
         select.selectmenu(); 
         return Facade.prototype.__change_ids.call(this, c, id_mod); 
     }; 
     SelectMenuFacade.prototype.set_selectedMenuItem = function (c, val) { 
         var optionToSelect = c.find("option[value='" + val + "']:eq(0)"); 
         if (optionToSelect.length  0) { 
             c.find("[selected='selected']").removeAttr("selected"); 
             c.val(val); 
             optionToSelect.attr("selected", "selected"); 
         } else { 
             // During mapping selected value can be set before the options so setting must be deferred 
             c.attr("data-deferred-value", val); 
         } 
     }; 
     SelectMenuFacade.prototype.get_selectedMenuItem = function (c) { 
         return c.val().trim(); //ll post the screen dump in the post below this:
Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

Transition from Old Libaries to new 2.1 libaries - Code breakage...

Ps - the line number is 575 .. where the error occurs....

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Transition from Old Libaries to new 2.1 libaries - Code breakage...

Hello Bruce,

Very same code was before December, the 24th.
Could you please give more details:

  • screenshots;
  • what you are trying to do;
  • when error appears.
Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

Transition from Old Libaries to new 2.1 libaries - Code breakage...

Alena,

To ensure I am reporting a real broken issue. I make no changes to my source code, I click external resources in my project, change the libraries to v2.0 , reload as prompted, and my code works again (minus the 64 bit support which is absolutley critical of course).

Change the libraries back to 2.1 - and my code breaks with the error shown above (it's as simple as clicking test - and running the tests in my chrome browser --- didnt have to recompile or build the app on IOS to get this to break).

The code looks like it's populating the default value of a select control when it breaks. It's breaking in code I haven't written (its framework code and I don't believe that's in my control).

Are there a lot of people that are using the new libraries? If I 'move past' this code - it will break on the same line of the foundation code - in another part of the application.

This seems reasonably serious to me. What should I do next?

Bruce

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

Transition from Old Libaries to new 2.1 libaries - Code breakage...

I've left the app in it's broken state for now. To reproduce - simply launch the app in the mobile frame by clicking test. Use the login credentials a href="mailto:Bruce.Stuart@the-software-studio.com" rel="nofollow"Bruce.Stuart@the-software-studio.com/a, password: codehead .

I've shared both the app and the db with support. and the public link to the app is here:

http://appery.io/app/mobile-frame?src...

You'll find this error in the console when after you click login:

component-manager.js:575 Uncaught TypeError: Cannot read property 'trim' of null

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

Transition from Old Libaries to new 2.1 libaries - Code breakage...

Here are the screen shots: ( what's going on in the app..... Login and then on the next page, read items from the db for presentation on the second page show below....)
With version 2.0 libraries:
Image
Image
Image

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

Transition from Old Libaries to new 2.1 libaries - Code breakage...

Please note the output in the console in image 2 of the new libraries....this error is NOT unique to this UI. I can get it to appear on any of 3-4 of the UI's with various use cases that work with the 2.0 libraries and not with the 2.1 libraries.

Best,
Bruce

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

Transition from Old Libaries to new 2.1 libaries - Code breakage...

Anyone have anything to say about this? I can't build my app for my client on a 64 bit platform while this is open ?

Return to “Issues”