polling problems

Started by fireside, February 14, 2008, 02:31:28 AM

Previous topic - Next topic

fireside

I can't seem to get keyboard polling working in the hello world program.  I copied the poll and keyaffected functions from the fps and have some variables.  I don't get errors on the program, but when I try to run it with the polling I get these errors:

Exception in thread "main" java.lang.NullPointerException
   at HelloWorldAWTGL.poll(HelloWorldAWTGL.java:92)
   at HelloWorldAWTGL.loop(HelloWorldAWTGL.java:56)
   at HelloWorldAWTGL.main(HelloWorldAWTGL.java:24)

OK I think it was null because I didn't include these lines:
       frame.addWindowListener(new WindowEvents());
       keyMapper=new KeyMapper(frame);   

but now I get an error on the WindowEvents() function saying it can't resolve it, so apparently I'm not importing something.
click here->Fireside 7 Games<-

fireside

Nevermind, apparently I didn't need to do anything with WindowEvents, I just needed to add the keymapper to the frame, or vice versa, whatever.   
click here->Fireside 7 Games<-