Search code examples
javascripttitaniumappcelerator

Cant adding JS file, or any other, to a Titanium project folder


So i am making a mobile app. in this app, on my main screen, i have a button that when clicked it will load another frame, or js file. this i know how to do but when pressing the button it gives me an error, "cant find file". after 3 hours of web searching i have tried changing the path names to every possible combination and moveing the file around. after doing so i came to realize that next to the new file i created, or any new file i create, there is an "*" and a question mark. for example if i make a new file called login.js it will show up on the explorer window as *?login.js, where the question mark is much smaller symbol. Is there a manifest i must add it to, like in netbeans, because it seems as if there is an error in the file but it is empty.

function signup(e){
    var menu = Ti.UI.createWindow({
        url: 'Main-Menu.js'
    });
    menu.open();
}

i also did: Titanium.include('/controllers/Main-Menu.js'); but always getting the same error, the JS file is in my apps controller folder.


Solution

  • This *? indication comes from the git plugin that is shipped with Titanium Studio. It indicates that the file is not commited.

    To answer your "can't find file" - question, I need to know some more details about your environment (target platform, sdk version, example code, ...)