Hi Quincy
I got the following errors
Building QuitCall
C:\Program Files\Research In Motion\BlackBerry JDE 4.2.1\bin\rapc.exe -quiet import="..\..\..\..\..\Program Files\Research In Motion\BlackBerry JDE 4.2.1\lib\net_rim_api.jar" codename=QuitCall QuitCall.rapc warnkey=0x52424200;0x52435200;0x52525400 "C:\Documents and Settings\Administrator\My Documents\BlkBerryProjs\QuitCall\QuitCall.java"
C:\Documents and Settings\Administrator\My Documents\BlkBerryProjs\QuitCall\QuitCall.java:116 : cannot find symbol
symbol : variable NativeConstants
location: class com.blackberrydeveloper.QuitCall.QuitCall
EventInjector.invokeEvent( new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEv ent.KEY_DOWN,(char) NativeConstants.KEY_SEND, KeypadListener.STATUS_NOT_FROM_KEYPAD));
^
C:\Documents and Settings\Administrator\My Documents\BlkBerryProjs\QuitCall\QuitCall.java:116 : inconvertible types
found : NativeConstants.KEY_SEND
required: char
EventInjector.invokeEvent( new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEv ent.KEY_DOWN,(char) NativeConstants.KEY_SEND, KeypadListener.STATUS_NOT_FROM_KEYPAD));
^
C:\Documents and Settings\Administrator\My Documents\BlkBerryProjs\QuitCall\QuitCall.java:116 : internal error; cannot instantiate net.rim.device.api.system.EventInjector.KeyCodeEve nt.<init> at net.rim.device.api.system.EventInjector.KeyCodeEve nt to ()
EventInjector.invokeEvent( new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEv ent.KEY_DOWN,(char) NativeConstants.KEY_SEND, KeypadListener.STATUS_NOT_FROM_KEYPAD));
^
C:\Documents and Settings\Administrator\My Documents\BlkBerryProjs\QuitCall\QuitCall.java:118 : cannot find symbol
symbol : variable NativeConstants
location: class com.blackberrydeveloper.QuitCall.QuitCall
EventInjector.invokeEvent( new EventInjector.KeyCodeEvent( EventInjector.KeyCodeEvent.KEY_UP , (char) NativeConstants.KEY_SEND, KeypadListener.STATUS_NOT_FROM_KEYPAD));
^
C:\Documents and Settings\Administrator\My Documents\BlkBerryProjs\QuitCall\QuitCall.java:118 : inconvertible types
found : NativeConstants.KEY_SEND
required: char
EventInjector.invokeEvent( new EventInjector.KeyCodeEvent( EventInjector.KeyCodeEvent.KEY_UP , (char) NativeConstants.KEY_SEND, KeypadListener.STATUS_NOT_FROM_KEYPAD));
^
C:\Documents and Settings\Administrator\My Documents\BlkBerryProjs\QuitCall\QuitCall.java:118 : internal error; cannot instantiate net.rim.device.api.system.EventInjector.KeyCodeEve nt.<init> at net.rim.device.api.system.EventInjector.KeyCodeEve nt to ()
EventInjector.invokeEvent( new EventInjector.KeyCodeEvent( EventInjector.KeyCodeEvent.KEY_UP , (char) NativeConstants.KEY_SEND, KeypadListener.STATUS_NOT_FROM_KEYPAD));
^
6 errors
Error!: Error: java compiler failed: javac -source 1.3 -target 1.1 -g -O -d C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\rapc_126410c4.d ir -bootcl ...
Error while building project
Can you please say which JDE you were using ?
Quote:
Originally Posted by Quincy
EventInjector is part of the regular device system api, so importing the system api and then doing:
EventInjector.invokeEvent( new EventInjector.KeyCodeEvent(EventInjector.KeyCodeEv ent.KEY_DOWN , (char) NativeConstants.KEY_SEND, KeypadListener.STATUS_NOT_FROM_KEYPAD));
EventInjector.invokeEvent( new EventInjector.KeyCodeEvent( EventInjector.KeyCodeEvent.KEY_UP , (char) NativeConstants.KEY_SEND, KeypadListener.STATUS_NOT_FROM_KEYPAD));
should work perfectly, as it is for me.
note: NativeConstants and Keypad constants are interchangeable
|