Re: NSWindowController window deprecated
Re: NSWindowController window deprecated
- Subject: Re: NSWindowController window deprecated
- From: Jean-Daniel Dupas <email@hidden>
- Date: Sat, 23 Jul 2011 21:55:03 +0200
Make sure you import all the required headers (especially the one defining MainWindowController).
Le 23 juil. 2011 à 21:29, Andre Masse a écrit :
> Not sure what's going on, I have my NSWindowController subclass declared as:
>
> @interface MainWindowController : NSWindowController <NSWindowDelegate>
>
> and have a property (and ivar) in my NSViewController subclass:
>
> @property (assign) MainWindowController *windowController;
>
>
> So, in MasterDetailController, if I call:
>
> [[[windowController window] contentView] setNeedsDisplay:YES];
>
> I get the warning:
>
> 'window' maybe deprecated because receiver type is unknown
>
> and doing this:
>
> NSWindow * wind = [windowController window];
>
> I get this one:
>
> 'window' is deprecated
>
> I've tried to clean the project, but the warnings are still there…
>
>
> Thanks for your reply,
>
>
> Andre Masse
>
>
> On 23/07/2011, at 14:05 , Nick Zitzmann wrote:
>
>>
>> On Jul 23, 2011, at 7:50 AM, Andre Masse wrote:
>>
>>> Hi,
>>>
>>> Got this warning in Xcode 4.1 on Lion. Is this really deprecated? There's no indication in NSWindowController header…
>>
>> Are you sure the object is typed as an NSWindowController and not an id or something else? -[NSWindowController window] is not deprecated, but -[NSCachedImageRep window] was deprecated a while ago, so maybe the compiler confused the two…
>>
>> Nick Zitzmann
>> <http://www.chronosnet.com/>
>>
>>
>>
>
> _______________________________________________
>
> 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
-- Jean-Daniel
_______________________________________________
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