Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 06-28-2009, 01:20 PM   #1 (permalink)
neduhamel
New Member
 
Join Date: Jun 2009
Posts: 5
Default accessing containing class variable from subclass

Hi everyone!

I know this is gonna sound "n00b", but i recently moved to obj-c, so i'm not very familiar with it yet.

Here's my question :
I have a class A with a member variable which is a class B.
So the class B does NOT inherit from class A, but it is a subclass (is this the right term?) of the class A.

Now, in one of the methods of class B, i need to access a member variable of class A which is public, and i can't figure out how to do it!!

Please do not give me an answer such as "why don't you change the architecture" because this is just a simple example, and my real architecture is way more complicated, but the problem summarize as above.

I tried to use "superclass" and "super" but i think this is only for inherited classes, right?

Can someone help me?
neduhamel is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,838
Threads: 89,210
Posts: 380,647
Top Poster: BrianSlick (7,129)
Welcome to our newest member, hariky007
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:03 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.