I develop开发者_如何学编程ed an application with simulator 4.6 and 5.0 then a couple of weeks later, today I finished the Torch version of my application (JDE 6.0 and simulator 9800)
My application works great with Torch but for the other older versions I got a
class net.rim.device.api.ui.ScrollView
error.
I googled and found some advices like a "try with JDE 5.0 or stg else" but I didn't work.
So how can I solve my problem? Is it possible for a application to works with every model of BlackBerry Device?
The ScrollView is not part of the API before version 6.0.
You will have to use a normal view(Manager) and send in the property to use scroll.
http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/ui/container/VerticalFieldManager.html
Behaviour A vertical field manager lays out fields top to bottom in a single column. You can build this manager with Manager.HORIZONTAL_SCROLL to accommodate fields wider than the manager's visible frame; you can build this manager with Manager.VERTICAL_SCROLL to accommodate collections of fields taller than the manager's visible frame.
You want to use the BlackBerry Preprocessor, and generate a build for each version of BlackBerry OS you support.
精彩评论