From: Drayton B. <dra...@gm...> - 2009-11-24 12:01:51
|
Hi all I checked out XMLVM a while ago and I've been watching it grow over the last few months. I've been quite impressed with the development! (Infact I find the whole idea quite ingenious!) Anyway's I've now decided to dip my feet in the water and give it a go! Although, as this is going to be more than testing a proof of concept, there's something I would like to clear up before I start. The problem I'm having is probably due to my development environment, which at the moment is Netbeans 6.7.1 When I import the XMLVM project into Netbeans and try and run the iFireworks example I get error: Unable to load image with name battery.png Unable to load image with name wifi.png Unable to load image with name chassis.png java.lang.NullPointerException at javax.swing.ImageIcon.<init>(ImageIcon.java:161) at org.xmlvm.iphone.internal.Device.addChassis(Device.java:101) at org.xmlvm.iphone.internal.Device.<init>(Device.java:68) at org.xmlvm.iphone.internal.SimulatorGUI.addDevice(SimulatorGUI.java:36) at org.xmlvm.iphone.internal.SimulatorGUI.<init>(SimulatorGUI.java:27) at org.xmlvm.iphone.internal.SimulatorDesktop.<init>(SimulatorDesktop.java:54) at org.xmlvm.iphone.UIApplication.<init>(UIApplication.java:24) at org.xmlvm.demo.ifireworks.Main.<init>(Main.java:8) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at org.xmlvm.iphone.UIApplication.main(UIApplication.java:78) at org.xmlvm.demo.ifireworks.Main.main(Main.java:48) Now I know this is because the images are not being found by the getResource() method in ImageLoader class (ln: 13). When I was just playing about with the code I would just hard code the appropriate path to get it to work. However I would now like to be able to just run the application and have it run without having to change this line. (As you can expect this gets frustrating quite quickly, also I would rather use the code as I get it from you :) ) I've tried using Eclipse, which seems to work, but I'm not familiar with the IDE, so I'd rather stick to what I know. I've also found this folder: xmlvm/var/iphone/netbeans which seems to have a netbeans project skeleton, however I cann't open this project. What version of netbeans is being used for this? I've tried compiling the source in Eclipse and then using the xmlvm.jar in a newly created NB project (both with and without copying over the relevent files with ones from the skeleton project) however the exceptions persist. I would greatly appreciate any sort of help with regards to this problem. Besides this I think the project is fantastic, and I'm looking forward to tapping out my first iPhone app with it! Regards Drayton -- http://www.facebook.com/DraytonBrown |