3
votes

I'm using Titanium Alloy 3.0.2 GA (on a Mac) to build a cross-platform mobile app

Why doesn't the Resources folder show up in the Titanium Studio, even though it is present in the filesystem?

I want to store some images that will be displayed within the application, and I believe that I should store them somewhere inside the Resources folder.

When I look at the Project Explorer within the Studio, I don't see a /Resources folder.

Image From Project Explorer

When I tried to add a Resources folder to the root, I was told that there is already a Resources folder!

Error when adding folder

Finder confirms that there is a Resources folder.

So, how do I get the Resources folder to show up in the Studio Project Explorer?

Also- it does not show up in the App Explorer View either.

2

2 Answers

9
votes

Yeah I had a problem with this as well, but thankfully this is documented in the guides section. Heres the pertinent information:

If your Resources folder is hidden, in the App Explorer view, click the View Menu button (right triangle pointing down) and select Customize Views..., then the Available Customizations dialog appears. In the Filters tab, uncheck the Titanium Resources Folder checkbox, then click the OK button. The Resources folder should appear in the App Explorer view.

For me It was actually in the "Project Explorer" view that I found the downward white arrow, and in the Available Customizations dialog I had to scroll all the way to the bottom of the Filters tab and uncheck "Titanium Resources Folder."

3
votes

Hmm...

Yes I was able to view the Resources folder by going into the "Customize View" option in the Studio.

But the proper place to put local files (car images in my case) is under the \app\assets\ folder. The \assets* are copied to the \Resources folder as part of the build.

So I just put my .jpg files under a new \car_images folder (under \app\assets) and was able to access them in my code

    var image = Ti.UI.createImageView({
    image: '/car_images/Acura.jpg'
})

So actually there is no need to see/modify the \Resources folder as it is managed by the build process

Thanks