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


Digital Ohmmeter LCD Audio Impedance Test Meter Speaker Voice Resistor System picture

Digital Ohmmeter LCD Audio Impedance Test Meter Speaker Voice Resistor System

$83.60



HP-Agilent-Keysight 41951-69001/ 41951-61001 Impedance Test Adapter for 41951A picture

HP-Agilent-Keysight 41951-69001/ 41951-61001 Impedance Test Adapter for 41951A

$500.00



BAS-Zahner Amos IM6 Impedance measurement unit picture

BAS-Zahner Amos IM6 Impedance measurement unit

$499.99



New Tonghui TH2810D LCR Meter Digital Eectrical bridge impedance measurement picture

New Tonghui TH2810D LCR Meter Digital Eectrical bridge impedance measurement

$499.00



Vintage Organic Impedance Measuring Control Panel AC-4 by CEFCO EXPERIMENTAL picture

Vintage Organic Impedance Measuring Control Panel AC-4 by CEFCO EXPERIMENTAL

$183.99



BECO Universal Impedance Bridge Model 315A, Brown Electro Measurement Corp. 315A picture

BECO Universal Impedance Bridge Model 315A, Brown Electro Measurement Corp. 315A

$129.99







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