On Sep 18, 2015, at 16:40 , Boyd Collier <bcoll...@mail.sdsu.edu> wrote:
> 
> Any suggestions why this might be happening would be greatly appreciated.

You should approach this systematically.

1. Is your app actually creating 2 window controllers? You can look at the 
object pointer in the debugger, and see if you had different objects each time.

If there are multiple objects being created, are they being created serially 
(one being disposed of before the other is created), or in parallel (both 
created simultaneously)?

2. Is your app creating 2 documents?

3. If there is only 1 window controller object, you can start looking at 
various pieces of nib-loading API (e.g. windowDidLoad, viewDidLoad, that sort 
of thing) to find out you’re instantiating a nib twice, or triggering the same 
machinery twice in the loading of a single nib.

Also, keep in mind that it’s not impossible that Cocoa is creating an extra 
document or window controller for its own purposes (e.g. as part of state 
restoration, or file versioning, or something newer like handoff). This *might* 
be the price of doing business, or it *might* indicate a problem in a different 
area of your app that it’s not obvious you should look at.



_______________________________________________

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

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

Reply via email to