Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Obtaining and releasing a Carbon NSWindow



I'm trying to find which screen iTunes is running on from within my
Cocoa app. In doing so, I do this:

NSWindow* iTunesWindow = [[NSWindow alloc]
initWithWindowRef:visData->iTunesWindow];

iTunesWindow is a WindowRef.



This seems to have some unfortunate side effects - parts of the iTunes
window turn white, and I'm guessing that I've locked iTunes out of its
own window control. I also get a list of _NSAutoreleaseNoPool errors,
despite the relevant code being surrounded by an NSAutoReleasePool
block.

I can't do [iTunesWindow release], either - that seems to destroy the
iTunes window...

How can I release my lock on the iTunes window without actually
destroying it?


Thanks,
Jon
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.