BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 06-26-2011, 03:07 PM   #1
asriragu
New Member
 
Join Date: Jun 2011
Model: 9800
PIN: N/A
Carrier: none
Posts: 8
Default how to reduce the number of classes

Please Login to Remove!

hai...!

i m new to blackberry development. i have developement an order processing application in BB. when i look at the bin folder i was having more than 100 classes.

eg: i have created a main screen class for new client addition. the screen is having 7 label fields and 7 corresponding text fields. i have defined a vertical field manager and add all these fields to it and then add the vertical field manger to the screen.

for the above screen, i have got 14 class files in the bin folder. it seems, for every field the progam is compiled.
eg:NewClient.class
NewClient$1.class
......NewClient$14.class.

is there anybody knows how design the UI in order to reduce the number of compiled classes.
Offline  
Old 06-26-2011, 03:36 PM   #2
Dubdub
Appleinator
 
Dubdub's Avatar
 
Join Date: Nov 2005
Location: New Hampshire
Model: App6+
OS: AJBR549
PIN: Ask
Carrier: ATT & Verizon
Posts: 20,038
Default Re: how to reduce the number of classes

Moved to a more appropriate section.
__________________
-->>BB FAQ

-->>Stinsonddog's Tip Site!

-->>Twitter


If someone helps, tell them by clicking the Thanks button.!!
Offline  
Old 06-26-2011, 06:13 PM   #3
hrbuckley
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Default Re: how to reduce the number of classes

I'm not sure what your question is. Did you sub-class each of these Field classes so that you defined 14 new classes? If so, you may want to ask youself if you really needed to sub-class, ie) what functionallity does each sub-class provide that is not provided by the base class.

If you are just concerned that you have 14 classes to support 7 input fields, then you may want to consider that the Text fields (BasicEditField etc) have a built in label, and a MainScreen provides a manager that does what a VerticalFieldManager does.
__________________
My other Blackberry is a PlayBook.
Offline  
Old 06-27-2011, 12:34 PM   #4
asriragu
New Member
 
Join Date: Jun 2011
Model: 9800
PIN: N/A
Carrier: none
Posts: 8
Default Re: how to reduce the number of classes

thank you for reply guys..!

I here by explain in detailed...

i have define a class named "NewClient" extends from MainScreen, where i defined 7 label fields and their corresponding RichTextFields. so altogether 14 fields have been defined in the above class.

when i look at the bin folder of the project , i have seen 15 compiled classes in the name of "NewClient".

eg:- NewClient.class
NewClient$1.class.......NewClient$14.class.
therefore, for every class, having plenty of .class files depending on the field.

therefore i end up more than 100 .class files in the bin folder.

when i run the program it says create process error regarding .Jar file.

why does the "$" come with the .class file?

how can i reduce the number of compiled classes? is thr any structure to develop the blackberry program in order to reduce the .class files?

thank you!
Offline  
Old 06-27-2011, 03:57 PM   #5
hrbuckley
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Arrow Re: how to reduce the number of classes

What you are refering to are anonymous classes. Without seeing your code it is difficult to say why they are being created. I also assume you are using Eclipse. I am unfamiliar with how Eclipse handles specific cases so someone else may have a better answere. Where I have seen anonymous classes created are situations like:

Code:
UiApplication.getUiApplication().invokeLater(new Runnable() {
    public void run() {
        // some code
    }
});
Will create an anonymous Runnable class.
__________________
My other Blackberry is a PlayBook.
Offline  
Old 12-23-2011, 02:05 AM   #6
mitSivatharsini
New Member
 
Join Date: Dec 2011
Model: 9800
PIN: N/A
Carrier: Blackberry Professional
Posts: 1
Default Error: to create more than 100 classes in blackberry

Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified
Packaging project mnbblog1 failed (took 22.703 seconds)

while i executing, i got above error. plz anyone help me.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads for: how to reduce the number of classes
Thread Thread Starter Forum Replies Last Post
Visual Voicemail! Voice-To-Text Automatic Transcription Mark Rejhon Aftermarket Software 20 07-11-2007 12:16 PM
7100i text messenging semfirefighter General Legacy Device Discussion 12 06-29-2007 06:59 AM
SIM Card "Phone Number" Field Question mahoward BES Admin Corner 14 05-25-2007 11:27 AM
Cannot delete call forwarding number. someguy99 General Legacy Device Discussion 1 05-18-2007 10:31 AM
My number not showing up (Voda - UK)? Empgamer General Legacy Device Discussion 3 09-15-2006 05:26 AM


NEW DELL OEM REPLACEMENT PROJECTOR LAMP FOR 4220 4320 GENUINE ORIGINAL  picture

NEW DELL OEM REPLACEMENT PROJECTOR LAMP FOR 4220 4320 GENUINE ORIGINAL

$198.22



Dell OEM Latitude Rugged Extreme 5414 Driving Board Cable for Cable 5414VERTCBL picture

Dell OEM Latitude Rugged Extreme 5414 Driving Board Cable for Cable 5414VERTCBL

$8.95



Dell OEM Latitude Rugged Extreme 7404 GPS Antenna Junction Cable Cable KMX0M picture

Dell OEM Latitude Rugged Extreme 7404 GPS Antenna Junction Cable Cable KMX0M

$2.95



Dell OEM Latitude Rugged Extreme 7404 Left and Right Mouse Buttons 00008 picture

Dell OEM Latitude Rugged Extreme 7404 Left and Right Mouse Buttons 00008

$5.95



DELL 330-6581 3306581 725-10229 OEM LAMP FOR 1510X 1610HD 1610X  - Made By DELL picture

DELL 330-6581 3306581 725-10229 OEM LAMP FOR 1510X 1610HD 1610X - Made By DELL

$39.98



Genuine OEM Dell 2375 B2375dnf B2375dfw 110V Fuser fixing N41P2 sku 724-BBCI picture

Genuine OEM Dell 2375 B2375dnf B2375dfw 110V Fuser fixing N41P2 sku 724-BBCI

$94.99







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.