when in sim this works:
local imageToDisplay = display.newImage( “images/testImage.png”, 50, 50 );
but when put on the iPhone the whole app crashes. [import]uid: 2773 topic_id: 248 reply_id: 300248[/import]
when in sim this works:
local imageToDisplay = display.newImage( “images/testImage.png”, 50, 50 );
but when put on the iPhone the whole app crashes. [import]uid: 2773 topic_id: 248 reply_id: 300248[/import]
I think the problem is the subdirectory. Put ‘testImage.png’ in the same folder as your main.lua file. Right now its looking for a file named “images/testImage.png”, not an image in the image directory. All your assets need to be in the same folder. It won’t recurse directories like that even thought the ‘images’ folder is copied into your application. I believe there was a thread about this but I don’t recall which one at the moment. [import]uid: 5 topic_id: 248 reply_id: 312[/import]
Can’t Ansca copy all the assets to the mainproject ?
So we could manage our files in a good structure [import]uid: 2734 topic_id: 248 reply_id: 409[/import]
I will add this as a feature request to hopefully be implemented in a future build. I agree, this would be handy. [import]uid: 5 topic_id: 248 reply_id: 414[/import]
Any progress on this feature fix? [import]uid: 4479 topic_id: 248 reply_id: 1648[/import]
Request is logged as bug #123. (The short-term workaround is to not use subdirectories.)
Copying all the assets at build time wouldn’t be a quick fix, because the paths in the Lua code would still be wrong, but you are correct that a slightly more complex build process could work here. [import]uid: 3007 topic_id: 248 reply_id: 1998[/import]
Project organization would be greatly aided by having some sort of subfolder organization. Looking at the sample projects “Ghosts vs Monsters” and “Martian Control” shows how hard it can be to find your Lua files among all the png and wav files. As a temporary solution I got the Project Plus plugin for textmat which allows me to sort folders by extension
http://ciaranwal.sh/2008/08/29/projectplus-update-2
Alternatively I can use Emacs’ ido extension for similar effect. [import]uid: 8800 topic_id: 248 reply_id: 19572[/import]