From: Arno P. <ar...@pu...> - 2009-12-12 10:25:03
|
the java.io.* stuff are mostly skeletons at the moment, so no wonder it does not work. Although I'm surprised that your machine crashes. Be nice to Gergely; sounds like his upcoming patch might fix your problems. :-) Arno On 12/12/09 12:04 AM, Dr. Alexander K. Seewald wrote: > Hi all, > > I was just trying to make access to raw resources possible in xmlvm, > in my case .wav files, for the android2iphone toolchain. I thought of > implementing openRawResource() for this: > > public String openRawResource(int resourceId) throws Exception { > String fileName = getFileNamePath(findResourceNameById(resourceId)); > String filePath = NSBundle.mainBundle().pathForResource(fileName,"wav"); > return new FileInputStream(filePath); > } > > However, this leads to severe crashes - in one case even bringing > down MacOS(!) when running the app on the simulator. I've checked and > fileName / filePath give back reasonable paths (when manually > adding the wav files to the resources in Xcode, of course - > otherwise it crashes on program start ;-). The moment I instantiate > FileInputStream, I get severe crashes without any debugging info > that I can see (in Xcode when running on the emulator) > > I've checked the objectiveC implementation of FileInputStream and it > seems to look ok. I've observed this behavior for SVN rev. 690. > > Any ideas what could cause this? > > Best, > Alex > P.S. Very minor issue: float and double NaN constants should read NAN in > objC - not NaN. |