This topic illustrates the structure of code generated by the Device Application Designer, and describes the contents of folders.
The BlackBerry application is built into two parts: the client application and the options library. The custom package contains all client code, while the options package contains options code. The custom package accommodates all screen classes as well as any tab folder packages. The tab panel classes are contained in the tab folder packages.
You can enable custom code generation by assigning a value of true to the platform-specific property Generate a custom coding subclass for the Device, Screens, Tab Folder, and Tab panels. You can specify this property for all elements from the preference page.
The application client code and images are in the generated folder.
All object API code is generated into a separate folder named object_api.
The custom code is generated into the custom folder in the same package structure as the generated folder. For each element that enables custom coding, a subclass is generated in this folder. Once generated, the custom subclass is not overwritten in subsequent code generation unless you select Remove custom folder in the generation wizard.
You can customize subclasses to insert your own code in your development environment.
For elements that support widget events, you can specify what events are supported for a particular element. When any of these events are selected, an event delegate is generated in the custom folder to delegate all the events for this element. The event delegate class is in same package as its element’s containing class (that is, the event delegate class for a button is located in the same package as the subclass for the parent screen).
You can customize the event delegate to apply your own code.
Similar to the custom subclasses, the event delegate is not overwritten during subsequent code generation, unless you select Remove custom folder.