BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 07-03-2008, 02:28 AM   #1
skynetchris
Knows Where the Search Button Is
 
Join Date: Apr 2008
Model: 7100T
PIN: N/A
Carrier: optus
Posts: 24
Default Inner class referencing.

Please Login to Remove!

Hi guys, I need a lesson in J2ME! I've got two inner classes (b [extends thread] and c [extends mainscreen]) within the class A (extends UiApplication):

Code:
public class A extends UiApplication{
   private class B extends Thread {}
   private final class C extends MainScreen {}
}
I'm trying to pass a reference using the 'this' keyword reference of C (screen) to B [which is invoking UiApplication.getUiApplication().pushGlobalScreen].

I've tried
Code:
//where C c = new C()
this.C
A.this.c            
A.this.C.this
Can you guys explain why plassing a Class name reference infront of the keyword this enables access to a parent class from an inner class? Any good docs on this? Any ideas how i would solve the above problem?
Offline  
Old 07-03-2008, 02:44 AM   #2
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Default

inner classes have access to all members of the parent class.
see javaworld for some explaination.
__________________
java developer, Devinto, hamburg/germany
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


Onset Computer Analog/Temp/RH/Light Data Logger MX1104 Onset Computer MX1104 picture

Onset Computer Analog/Temp/RH/Light Data Logger MX1104 Onset Computer MX1104

$271.78



Andrea Anti Noise Analog Computer Headphones NC-91 picture

Andrea Anti Noise Analog Computer Headphones NC-91

$17.60



Measurement Computing 4-20mA Input 24-Channel Analog Input Board CIO-DAS48 picture

Measurement Computing 4-20mA Input 24-Channel Analog Input Board CIO-DAS48

$180.00



Computer Based Andon Alert Signal Manufacturing Software Application picture

Computer Based Andon Alert Signal Manufacturing Software Application

$499.00



Schneider PLC TWIDO TM2AMM6HT ANALOGUE I/O MODULE 20mA 24VDC Missing Terminal picture

Schneider PLC TWIDO TM2AMM6HT ANALOGUE I/O MODULE 20mA 24VDC Missing Terminal

$156.00



Measurements Computing PCI-DDA02/16 Analog Output and Digital I/O Card picture

Measurements Computing PCI-DDA02/16 Analog Output and Digital I/O Card

$699.99







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