Post

Replies

Boosts

Views

Activity

Reply to How to draw in background window
Well, I found pretty quickly an incongruous bringToFront: in my drawRect: code. Am I ashamed! I had put it there a long time ago, without thinking a second, in order to “solve” a problem that appeared when a document was being opened, that necessitated an alert concerning an error in the file. I had completely forgotten this, and my pseudo-solution came back on me with a vengeance. Thanks again!
Dec ’20
Reply to How to draw in background window
Thank you for your reply! I’m using AppKit. This is a big program, written in Objective-C. Yes, indeed the calculations are made in a background operation queue. The code that updates the custom view in the background window is just a simple setNeedsDisplay: sent to that view, in an operation added to the main operation queue. However, what you wrote made me think that maybe, surreptitiously, it’s my drawRect: method that, somewhere, somehow, brings the window to the foreground. My drawRect: method is v e r y complex… I’ll examine it thoroughly and will post a sequel to my reply in a couple of days. Thank you very much for your thoughts!
Dec ’20