On Apr 27, 2017, at 15:27 , Peter Hudson <[email protected]> wrote: > > This is a document based app. > And it's the same table view that is affected each time. […] And I find it > strange that the table view address should become exactly the same as it had > in a previous document that has been closed.
I’m sorry, I don’t understand. This seems contradictory to me. If it’s a document-based app, you get a new window for each document, so it’s *not* the same table view [instance] each time — the previous document window had a different table view [instance]. (And if you kept both documents open, you’d literally have two table views at one time.) So this mysteriously-changing outlet is where, in a view controller? A window controller? I suggest you change the outlet to an @property (if it’s only an instance variable), override the synthesized setter with a custom method, and set a breakpoint in your method. If anything is changing the outlet, you should be able to see why. (Prediction: you’ll find that the setter is not ever called after the document window is first opened. I’m guessing that the object that has the incorrect outlet value is not the correct object — controller or whatever.) Hmm, random thought: Is there any chance this app used to manually insert view controllers in the responder chain? Depending on how you did that, the new-ish auto-insertion of view controllers may mess your old code up. _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
