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



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


SA-3786-12 603350 Fuel Shutoff Solenoid Kubota Compatible 721D2 21HP Grasshopper picture

SA-3786-12 603350 Fuel Shutoff Solenoid Kubota Compatible 721D2 21HP Grasshopper

$30.29



Cole Hersee (24059-BP) 12V Insulated SPST Continuous Duty Solenoid picture

Cole Hersee (24059-BP) 12V Insulated SPST Continuous Duty Solenoid

$29.55



12V Fuel Shut-Off Solenoid for Syncro-Start 1502-12C2U1B2S1A 3003-3007 240-22177 picture

12V Fuel Shut-Off Solenoid for Syncro-Start 1502-12C2U1B2S1A 3003-3007 240-22177

$51.99



Fuel Shut Off Solenoid Fit For Kubota D905 D1005 D1105 17208-60010 17208-60015 picture

Fuel Shut Off Solenoid Fit For Kubota D905 D1005 D1105 17208-60010 17208-60015

$21.99



6669415 Fuel Timer Solenoid Bobcat Skid Steer Loader Excavator Compatible picture

6669415 Fuel Timer Solenoid Bobcat Skid Steer Loader Excavator Compatible

$29.99



S.36121 Starter Solenoid Fits John Deere picture

S.36121 Starter Solenoid Fits John Deere

$39.39







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