Thanks for that suggestion Martin - I hadn't thought of looking at parent 
window. I kind of think that is an implementation detail behind the scenes that 
we shouldn't have to worry about in our code, so will file a bug report about 
it as Corbin suggested, and hopefully it will either be made to return the same 
window controller as if the window hadn't been swapped out from under you, or 
the documentation changed to make it very clear of the existence of this issue 
(to me, the former solution would seem by far the best one).

Regards

Gideon


On 30/07/2011, at 9:44 AM, Martin Wierschin wrote:

>> I just came across a bit of an issue with the full screen mode in Lion: if 
>> you have a view and use [[self window] windowController] to get at your 
>> window controller, it will return nil in full screen mode. The window gets 
>> swapped out with an NSToolbarFullScreenWindow, which doesn't have a window 
>> controller set.
> 
> Thanks for letting us know about this potential issue.
> 
>> I have found that [[NSApp mainWindow] windowController] returns the right 
>> thing, which is sufficient for my needs
> 
> It looks like you can also get to the proper window controller via: 
> [[[toolbarItemView window] parentWindow] windowController], which seems like 
> a safer solution.
> 
> Best,
> ~Martin
> 

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to