> I would like to know what could be causing a ControlledAccessException
> on the BlackBerry device simulator.
Did you read the Javadocs for the exception? They'll give you an idea of why
it would get thrown.
> BTW, is there any way of deleting an application from the
> BlackBerry application launcher. I cannot seem to find
> a way to do this but if this could be done, I could
> delete the application and see if I can
> reproduce this exception.
Do you mean from the ribbon on the device, or from the emulator? If the
latter, just delete the COD file in your emulator's file system.

Signature
Darryl L. Pierce <mcpierce@gmail.com>
Homepage: http://mcpierce.multiply.com/
"McVeigh's lawyer got him the death penalty, which, quite frankly,
I could have done." - Jon Stewart
John Goche - 21 Feb 2006 17:40 GMT
Thanks,
I deleted the file:
C:\Program Files\Research In Motion\BlackBerry JDE
4.1.0\simulator\Foo.cod
and closed the emulator. The file was gone from the file system.
Then I loaded the COD file again with a quick recompile and run.
However, I still did not get the ControlledAccessException.
I suspect that the exception was thrown the first time I loaded
the app onto the emulator due to application preferences not
being there. I am still not sure about this.
After deleting the COD file and reloading the app, the
application preferences it had stored on the simulator
persisted on the device. These were created with a
J2ME RecordStore object.
Is there a way to delete the RecordStore with the application?
I thought this was supposed to happen automatically when
the application is gone. How can I do this?
Thanks,
JG
Darryl L. Pierce - 22 Feb 2006 13:57 GMT
> Is there a way to delete the RecordStore with the application?
RecordStore.deleteRecordStore(String storename)
> I thought this was supposed to happen automatically when
> the application is gone. How can I do this?
You're dealing with an emulator. They don't always match spec like the
device.

Signature
Darryl L. Pierce <mcpierce@gmail.com>
Homepage: http://mcpierce.multiply.com/
"McVeigh's lawyer got him the death penalty, which, quite frankly,
I could have done." - Jon Stewart
John Goche - 22 Feb 2006 16:09 GMT
Hi,
I tried calling RecordStore.deleteRecordStore(String)
to see if I could reproduce the IllegalAccessException
but was not able to reproduce it in this way either. I nnly
see this error just the very first time I install the .cod file
on a fresh JDE 4.1.0 installation. So it may be that this
does not show up on an actual device.
Regards,
JG