Result of expression 'Titanium.UI.createButton' [] is not a function

You must Login before you can answer or comment on any questions.

When loading a window, I'm getting the following error:

[ERROR] Script Error = Result of expression 'Titanium.UI.createButton' [] is not a function. at userHome.js (line 142).

Nothing changed in the code. I recently upgraded the SDK version. I've already tried cleaning the application, which in the past has fixed similar issues. Here's the code in question.

var classButton = Titanium.UI.createButton({
            right : 5,
            width: 175,
            height: 45,
            title : 'Join live class',
            row : x,
            section : 0
        });
        classButton.addEventListener('click', runFunctionA);
        row.add(classButton);

— asked 1 year ago by Dominic Foti
2 Comments
  • Is this happening on a specific platform? iOS? Android? Mobile web?

    — commented 1 year ago by Chris Barber

  • Sorry, forgot that important detail. iOS, in the iPad simulator.

    — commented 1 year ago by Dominic Foti

1 Answer

hi,

if you upgraded the sdk and did not restart the Ti Studio then do it first.

have you cleaned the app from project menu..?

— answered 1 year ago by Mitul Bhalia
answer permalink
3 Comments
  • I restarted Titanium Studio, as well as my computer. I did clean the app through the project menu, but it didn't resolve the issue.

    — commented 1 year ago by Dominic Foti

  • try to use Ti.UI.createButton instead of Titanium.UI.createButton

    — commented 1 year ago by Mitul Bhalia

  • I changed it to use Ti.UI.createButton then cleaned the project, but same error.

    — commented 1 year ago by Dominic Foti

Your Answer

Think you can help? Login to answer this question!