Search code examples
iosappcelerator

invalid method (createTableViewRow) passed to UIModule


i am having this error when i run my app on the device ( iPhone 7 ), but when i run it in the emulator works fine. Its really strange.

The code is:

   Ti.API.info( json );   
   var renglon = Ti.UI.createTableViewRow({
     id: id,   
        width: Ti.UI.FILL,
        height: '80dp',
   });

In the emulator works OK, but in the device i got an error, the error appears just after the json is printed in the log.

[WARN] :   Attempted to load TiUITableViewRowProxy: Could not find class definition.
[ERROR] :  Script Error {
[ERROR] :      column = 2875;
[ERROR] :      line = 1;
[ERROR] :      message = "invalid method (createTableViewRow) passed to  UIModule";
[ERROR] :      sourceURL =    "file:///var/containers/Bundle/Application/B99CA23F-183D-4C5F-A5DC-FA9CFC614186/CarWash.app/src/vistas/personal.js";
[ERROR] :      stack = "[native code]\nagregarRenglonPersonal@file:///var/containers/Bundle/Application/B99CA23F-183D-4C5F-A5DC- FA9CFC614186/CarWash.app/src/vistas/personal.js:1:2875\nonload@file:///var/contain  ers/Bundle/Application/B99CA23F-183D-4C5F-A5DC-  FA9CFC614186/CarWash.app/src/vistas/personal.js:1:3651";
[ERROR] :  }
-- End application log -------------------------------------------------------

i'm using:

Titanium appcelerator studio build: 4.9.0.201705302345

SDK: 6.1.0GA

Thanks in advance.


Solution

  • We are run into the same error today!

    Wrong source code in respect of the table view was the reason, a stupid C&P error:

    var tableView = Ti.UI.createLabel({...});

    instead of

    var tableView = Ti.UI.createTableView({...});