• 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: Trouble with design pattern
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble with design pattern


  • Subject: Re: Trouble with design pattern
  • From: "email@hidden" <email@hidden>
  • Date: Fri, 18 Feb 2011 15:41:01 -0800

Sorry, the forward declarations go in your .h files. You still have to import your MyDocument.h in your implementation files (ie. your CustomView.m files).

What warnings are you getting?

As far as your nil document problem, I don't know. I suspect something is not setup correctly.

In your code fragment

[[[self window] windowController] document]]

you're making three calls, any of which might be returning nil. Which is it?

_murat

On Feb 18, 2011, at 2:22 PM, Carlos Eduardo Mello wrote:

> Thanks for the tip.
>
> I've just tried your suggestion:  placed the forward declarations in the custom view files and declared instances of the MyDocument type. I checked all the details and tested several times, but the compilers still give me the same warnings, and now there is a nother problem:
>
> [[[self window] windowController] document]] doesn't seem to be garanteed to return something other than nil at [awakeFromNib].
>
> Is there some other point in the document intializing cycle where I could put that call so I can store it for repeated use during app's execution?
_______________________________________________

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: 
 >Trouble with design pattern (From: Carlos Eduardo Mello <email@hidden>)
 >Re: Trouble with design pattern (From: email@hidden)
 >Re: Trouble with design pattern (From: Carlos Eduardo Mello <email@hidden>)

  • Prev by Date: Re: Trouble with design pattern
  • Next by Date: Re: NSDistributedNotificationCenter questions.
  • Previous by thread: Re: Trouble with design pattern
  • Next by thread: Re: Trouble with design pattern
  • Index(es):
    • Date
    • Thread