This is kind of a followup on my previous question.
I have an NSTextView
, which updates normally (well, actually there are some bugs in which it will draw awfully slowly until you pass your mouse over it. wierd.) if you are in the app. but the problem here is that I use
[myWindow setLevel:NSFloatingWindowLevel];
to set it on top of the rest of windows. It is a small utiltiy, which you can hide and show with a NSStatusItem
.
Boom: Notification. The app gets a string, and then I use [myTextView setString:somestring];
to put it on the NSTextView
.
If the window has focus it obviously works well. But if the user is currently on another app... Any ideas on how I could make it work if the focus is currently somewhere else? I also have some NSTextFields
, and they update great regardless of focus, but the NSTextView
will go blank until the user clicks on the window. Actually, the NSStatusItem
shows the window with
[lyricWindow makeKeyAndOrderFront:nil];
which doesent redraw the NSTextView
either. If app is hidden, the user is in another app, the update occurs, and then the user focuses the app the NSTextView
will indeed be blank until the window is clicked. Is there a way of making the window believe it was clicked and has focus? Is there a way to force update or to make the NSTextView
not require it to draw?
Thank you!
Kevin