BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 07-27-2006, 03:19 PM   #1
Zhi Li
Knows Where the Search Button Is
 
Join Date: Mar 2006
Model: 7250
Posts: 18
Question Accessor between classes in one package

Please Login to Remove!

Hello all,
The main class of my application get the mail which user just clicked, then call second class(push a new screen) to format content of Body and display it, I need an accessor to transfer the mail(object) from first class to second, but it failed, can any one help me to do it?
in first class:
public final class firstClass extends UiApplication implements ViewListener {
....
public void open(MessageEvent e) {
Message msg=e.getMessage();
String subject=msg.getSubject();

if (subject.indexOf("mykey")>-1) {
_secondscreen=new secondScreen();
UiApplication.getUiApplication().pushModalScreen(_ secondscreen);
}

}

public Message getWhichmail() {
return this.whichmail;
}
protected void setWhichmail(MessageEvent e) {
whichmail =e.getMessage();
}

in secondscreen:

private firstClass first;
public secondScreen() {
// super.close();
firstClass app=new firstClass();

Message msg=app.getWhichmail();
...
but it failed in firstClass app=new firstClass();
please help!

Last edited by Zhi Li; 07-27-2006 at 03:37 PM..
Offline  
Old 07-27-2006, 03:28 PM   #2
donricouga
Thumbs Must Hurt
 
Join Date: Jul 2006
Location: Atlanta
Model: 8703e
Carrier: Sprint
Posts: 58
Default

I'm guessing you left out the package names of both classes on purpose.
How are you building this app (IDE) ?
Offline  
Old 07-27-2006, 03:35 PM   #3
Zhi Li
Knows Where the Search Button Is
 
Join Date: Mar 2006
Model: 7250
Posts: 18
Default

hi,
the pakcage is on top of both classes, i use BB IDE 4.0.1 and run code in simulator
Offline  
Old 07-27-2006, 03:58 PM   #4
donricouga
Thumbs Must Hurt
 
Join Date: Jul 2006
Location: Atlanta
Model: 8703e
Carrier: Sprint
Posts: 58
Default

What is the exact error you are getting ?
Offline  
Old 07-27-2006, 04:17 PM   #5
Zhi Li
Knows Where the Search Button Is
 
Join Date: Mar 2006
Model: 7250
Posts: 18
Default

its ok to build the project, but when debug it, it stop at "firstClass app=new firstClass" and show"code is not available"
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


Vintage 3M Scotch Deluxe C-40 Tape Dispenser - Black - Weighted - Very Good picture

Vintage 3M Scotch Deluxe C-40 Tape Dispenser - Black - Weighted - Very Good

$19.99



Vintage IHC   DOOR LOCK ASSY.   fits International  #448964C1  Case New  Holland picture

Vintage IHC DOOR LOCK ASSY. fits International #448964C1 Case New Holland

$44.00



Vintage 1988 Texas Instruments TI-34 Scientific Solar Calculator & Cover Works picture

Vintage 1988 Texas Instruments TI-34 Scientific Solar Calculator & Cover Works

$12.99



Vintage Casio fx-270W PLUS Scientific Calculator with Case & Manual Tested WORKS picture

Vintage Casio fx-270W PLUS Scientific Calculator with Case & Manual Tested WORKS

$12.99



custom led neon, store front sign, vintage neon signs, lighted letters, signs picture

custom led neon, store front sign, vintage neon signs, lighted letters, signs

$100.00



store front sign, vintage neon signs, lighted letters, lighted business signs picture

store front sign, vintage neon signs, lighted letters, lighted business signs

$100.00







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