Quantcast
Viewing all articles
Browse latest Browse all 8068

createController('viewId') makes an -[NSNull krollObjectForBridge:]: unrecognized selector sent to instance error

I've alot views in my application which where created with the 'createController()'. And all these views are nested one in another, working this way was successful but now in one of them i tried to create a new one first by using the 'Require' tag and as it has generated an error (the same with the second way i will show now) and then dynamically as shown in this controller code :

////// :: adding reservScreen :: ////// ////// ////// //////// 
function addreservTabRow(){
 
    $.scrollView.reservTabRow = Ti.UI.createView({
        id : "reservTabRow",
        top:0,
        left:0,
        width:320,
        height:35,
        backgroundColor:"blue",
        opacity:0.2 
    });
    var xxx = Alloy.createController('reservTabRow');
    $.scrollView.reservTabRow.add(xxx.getView());
    $.scrollView.add($.scrollView.reservTabRow);
}
//exports.addreservTabRow = addreservTabRow;
/////////////////////
//addreservTabRow();
 
$.pps.addEventListener("click",function(){
    addreservTabRow();
});
but i got this error :
[ERROR] :  Script Error {
[ERROR] :      backtrace = "#0 () at file://localhost/Users/rn05/Library/Application%20Support/iPhone%20Simulator/6.1/Applications/EE4DFEC3-8776-4BA9-8708-AF3C510ED624/BookMyNight.app/alloy/controllers/reservScreen.js:144";
[ERROR] :      line = 13;
[ERROR] :      message = "-[NSNull krollObjectForBridge:]: unrecognized selector sent to instance 0x3a30678";
[ERROR] :      sourceId = 304255776;
[ERROR] :      sourceURL = "file://localhost/Users/rn05/Library/Application%20Support/iPhone%20Simulator/6.1/Applications/EE4DFEC3-8776-4BA9-8708-AF3C510ED624/BookMyNight.app/alloy/controllers/reservScreen.js";
[ERROR] :  }

Viewing all articles
Browse latest Browse all 8068

Trending Articles