• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How call upper layer function
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How call upper layer function


  • Subject: Re: How call upper layer function
  • From: Rodrigo Zanatta Silva <email@hidden>
  • Date: Wed, 20 Apr 2011 16:23:56 -0300

lol, you are correct. The book didn't say this.
You have to include in .M not in .H.

Now I understand how to use the @class. This make sense now.

Thanks.. Now the problem is REALLY solved :P

2011/4/20 Quincey Morris <email@hidden>

> On Apr 20, 2011, at 11:34, Rodrigo Zanatta Silva wrote:
>
> //Finally in "LevelDown.m" i have
> #import "LevelDown.h"
>
> @implementation *LevelDown*
> - (id)initWithLevelUp: (LevelUp *)levelUp; {
>      self = [super init];
>      LevelUp* myLevelUp = levelUp;
>      [myLevelUp doSomething];   //Everything work, but this will give-me a
> problem
>      return self;
> }
> @end
>
>
> You need:
>
> #import "LevelDown.h"
>
> #import "LevelUp.h"
>
>
> @implementation *LevelDown*
> - (id)initWithLevelUp: (LevelUp *)levelUp; {
>      self = [super init];
>      LevelUp* myLevelUp = levelUp;
>      [myLevelUp doSomething];   //Everything work, but this will give-me a
> problem
>      return self;
> }
> @end
>
>
> The @class solves the circular reference in the .h files, but you must
> still include the actual interface in any compilation unit that uses the
> class.
>
>
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >How call upper layer function (From: Rodrigo Zanatta Silva <email@hidden>)
 >Re: How call upper layer function (From: Conrad Shultz <email@hidden>)
 >Re: How call upper layer function (From: Rodrigo Zanatta Silva <email@hidden>)
 >Re: How call upper layer function (From: Michael Dautermann <email@hidden>)
 >Re: How call upper layer function (From: Quincey Morris <email@hidden>)
 >Re: How call upper layer function (From: Rodrigo Zanatta Silva <email@hidden>)
 >Re: How call upper layer function (From: Rodrigo Zanatta Silva <email@hidden>)
 >Re: How call upper layer function (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: How call upper layer function
  • Next by Date: video analog to MPMediaItemCollection?
  • Previous by thread: Re: How call upper layer function
  • Next by thread: Re: How call upper layer function
  • Index(es):
    • Date
    • Thread