Re: 10.7 Full-Screen transition animation corrupts my UI - how to avoid?

2012-07-22 Thread Motti Shneor
Thanks everyone (Dennis, Kyle) I Implemented the suggested delegate --- and it doesn't even get called Here is my implementation, in case I'm really stupid: - (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)frameSize { NSSize min = [sender minSize]; NSSize max = [sender ma

How to anchor a child-window to its parent top-right (or other point) while parent resizes.

2012-07-22 Thread Motti Shneor
Hi. This seems a real newbie question, but the solutions I found seem too complicated for my task. I have a non-NSPopover pop-over info window (can't use NSPopOver for many reasons). This "popover like" is just a window that draws itself "anchored" to some point in the parent window's coord

Re: 10.7 Full-Screen transition animation corrupts my UI - how to avoid?

2012-07-22 Thread Dennis
On Jul 22, 2012, at 2:00 AM, Motti Shneor wrote: > I Implemented the suggested delegate --- and it doesn't even get called > > Here is my implementation, in case I'm really stupid: My guess is that you neglected to either set the delegate for the window, or to declare the NSWindowDelegate p

Re: How to anchor a child-window to its parent top-right (or other point) while parent resizes.

2012-07-22 Thread Keary Suska
On Jul 22, 2012, at 5:34 AM, Motti Shneor wrote: > This seems a real newbie question, but the solutions I found seem too > complicated for my task. > > I have a non-NSPopover pop-over info window (can't use NSPopOver for many > reasons). > > This "popover like" is just a window that draws its

Re: 10.7 Full-Screen transition animation corrupts my UI - how to avoid?

2012-07-22 Thread Kyle Sluder
On Sun, Jul 22, 2012, at 09:13 AM, Dennis wrote: > On Jul 22, 2012, at 2:00 AM, Motti Shneor wrote: > > > I Implemented the suggested delegate --- and it doesn't even get called > > > > Here is my implementation, in case I'm really stupid: > > My guess is that you neglected to either set the

Re: 10.7 Full-Screen transition animation corrupts my UI - how to avoid?

2012-07-22 Thread Dennis
On Jul 22, 2012, at 10:12 AM, Kyle Sluder wrote: > On Sun, Jul 22, 2012, at 09:13 AM, Dennis wrote: >> On Jul 22, 2012, at 2:00 AM, Motti Shneor wrote: >> >>> I Implemented the suggested delegate --- and it doesn't even get called >>> >>> Here is my implementation, in case I'm really stupid:

Re: 10.7 Full-Screen transition animation corrupts my UI - how to avoid?

2012-07-22 Thread Lee Ann Rucker
There's also custom full screen animations, as shown in http://developer.apple.com/library/mac/#samplecode/FullScreenWindow/Listings/FullScreen_MyWindowController_m.html - Original Message - From: "Dennis" To: "Kyle Sluder" Cc: "Motti Shneor" , "Cocoa-Dev List" Sent: Sunday, July 2

Re: 10.7 Full-Screen transition animation corrupts my UI - how to avoid?

2012-07-22 Thread Quincey Morris
On Jul 22, 2012, at 02:00 , Motti Shneor wrote: > - (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)frameSize { >NSSize min = [sender minSize]; >NSSize max = [sender maxSize]; >if (frameSize.width > max.width || >frameSize.height > max.height || >frameSize.wi

Re: 10.7 Full-Screen transition animation corrupts my UI - how to avoid?

2012-07-22 Thread Quincey Morris
(BTW, your reply from which I'm quoting below wasn't CC'ed to the list, but it looks like it was intended for the list. I'll let you go ahead and repost if that was your intention.) On Jul 22, 2012, at 11:56 , Motti Shneor wrote: > One thing you say raises a question, though. How can minContent

[NSSound isPlaying] fails to indicate sound termination in Lion

2012-07-22 Thread Jay Reynolds Freeman
I have a problem with some code to monitor when a sound has finished playing; it works fine under Snow Leopard (MacOS 10.6.8) but not under Lion (MacOS 10.7.4). Since Mountain Lion is still under nondisclosure I will not comment on its behavior there. This has been a problem in an existing app

Re: [NSSound isPlaying] fails to indicate sound termination in Lion

2012-07-22 Thread Fritz Anderson
On 22 Jul 2012, at 6:12 PM, Jay Reynolds Freeman wrote: >[wraithIconView setImage:wraithIconImageOM]; // "OM" means "Open > Mouth". >[self showIconViewAbruptly:YES]; >[toPlay play]; >while( [toPlay isPlaying] ) { >NSLog(@"Still playing...");// Instr

Re: [NSSound isPlaying] fails to indicate sound termination in Lion

2012-07-22 Thread Jay Reynolds Freeman
The "sleep" was only for instrumentation; without the sleep and the NSLog, the code exhibits the problem described. And [NSSound play] is supposed to run asynchronously ... -- Jay Reynolds Freeman - jay_reynolds_free...@mac.com http://JayReynoldsFreeman.com (personal web si

Re: [NSSound isPlaying] fails to indicate sound termination in Lion

2012-07-22 Thread Kyle Sluder
On Jul 22, 2012, at 5:43 PM, Jay Reynolds Freeman wrote: > The "sleep" was only for instrumentation; without the sleep and the NSLog, > the code exhibits the problem described. And [NSSound play] is supposed to > run asynchronously ... > > -- Jay Reynolds Freeman > - > j

Re: [NSSound isPlaying] fails to indicate sound termination in Lion

2012-07-22 Thread Kyle Sluder
On Jul 22, 2012, at 5:43 PM, Jay Reynolds Freeman wrote: > The "sleep" was only for instrumentation; without the sleep and the NSLog, > the code exhibits the problem described. And [NSSound play] is supposed to > run asynchronously ... > Asynchronous APIs usually depend on the run loop of t

Re: [NSSound isPlaying] fails to indicate sound termination in Lion

2012-07-22 Thread Fritz Anderson
The essential thing you showed in your code is that you went into a loop while waiting for isPlaying to turn to NO, or at least never returned from your action method back to AppKit. I don't hear you saying otherwise. If that's what you're doing, bear in mind that other APIs (I'm thinking of Fo

Re: [NSSound isPlaying] fails to indicate sound termination in Lion

2012-07-22 Thread Ken Thomases
On Jul 22, 2012, at 7:43 PM, Jay Reynolds Freeman wrote: > The "sleep" was only for instrumentation; without the sleep and the NSLog, > the code exhibits the problem described. And [NSSound play] is supposed to > run asynchronously ... You didn't pay attention to what Fritz wrote. You need to

Re: [NSSound isPlaying] fails to indicate sound termination in Lion

2012-07-22 Thread Jay Reynolds Freeman
What Ken, Fritz and Kyle are saying makes sense, but flies a little bit in the face of what "asynchronous" often means. (I won't quibble if Apple is doing it their own way, they often do.) It also doesn't explain why the same linked executable behaves one way under Snow Leopard and another way

Re: [NSSound isPlaying] fails to indicate sound termination in Lion

2012-07-22 Thread Charles Srstka
On Jul 22, 2012, at 8:43 PM, Jay Reynolds Freeman wrote: > What Ken, Fritz and Kyle are saying makes sense, but flies a little bit in > the face of what "asynchronous" often means. (I won't quibble if Apple is > doing it their own way, they often do.) It also doesn't explain why the same > li

Re: [NSSound isPlaying] fails to indicate sound termination in Lion

2012-07-22 Thread Jens Alfke
On Jul 22, 2012, at 6:43 PM, Jay Reynolds Freeman wrote: > Since my app has nothing to do while waiting for the sound to play, a polling > loop on "isPlaying" is actually a good deal less code (only two lines) than > setting up a delegate with "-sound:didFinishPlaying" implemented. It may be

Re: [NSSound isPlaying] fails to indicate sound termination in Lion

2012-07-22 Thread Charles Srstka
On Jul 22, 2012, at 9:24 PM, Jens Alfke wrote: > On Jul 22, 2012, at 6:43 PM, Jay Reynolds Freeman > wrote: > >> Since my app has nothing to do while waiting for the sound to play, a >> polling loop on "isPlaying" is actually a good deal less code (only two >> lines) than setting up a delegat

Re: [NSSound isPlaying] fails to indicate sound termination in Lion

2012-07-22 Thread Ken Thomases
On Jul 22, 2012, at 9:24 PM, Jens Alfke wrote: > On Jul 22, 2012, at 6:43 PM, Jay Reynolds Freeman > wrote: > >> Since my app has nothing to do while waiting for the sound to play, a >> polling loop on "isPlaying" is actually a good deal less code (only two >> lines) than setting up a delegat

Re: [NSSound isPlaying] fails to indicate sound termination in Lion

2012-07-22 Thread Jay Reynolds Freeman
I guess my main problem with all this is that Apple provides [NSSound isPlaying] with no indication that the method is not general-purpose; reading the documentation would have you think that it would return a correct answer no matter when and how used. -- Jay Reynolds Freeman

Re: [NSSound isPlaying] fails to indicate sound termination in Lion

2012-07-22 Thread Gavin Stokes
> > Since my app has nothing to do while waiting for the sound to play I struggled with this when getting into iOS programming and networking; everything's asynchronous, and you can't just have your UI locked up. So what is my app to do while it's waiting? It's a fundamental programming problem

Profound UITableView rendering-performance problem, but only at certain positions?

2012-07-22 Thread Gavin Stokes
I have a tableview that contains some graphic elements that rotate to reflect the phone's heading. I only reload the visible rows, and I don't do it while the table is scrolling. I filter the headings to 10-degree increments to cut down the amount of heading updates I get. Sometimes these work f

Re: Icon Overlay on Mac OSX

2012-07-22 Thread Alfian Busyro
Actually I'd like to do this. But I'm not the man who made the specification, and my superior want it in the app. Btw, thanks for all replies. Regards, Alfian On 12/07/21 2:28, Uli Kusterer wrote: On 18.07.2012, at 12:37, Alfian Busyro wrote: Just like I thought, injecting code is not a good

Re: Profound UITableView rendering-performance problem, but only at certain positions?

2012-07-22 Thread Gavin Stokes
I found the exact condition that results in this problem. The corruption only happens when 1. There's more than one section on the screen. 2. The last row of the topmost section is only partially visible, and the visible portion is smaller than the section header. The part about the section head

Re: [NSSound isPlaying] fails to indicate sound termination in Lion

2012-07-22 Thread Jens Alfke
On Jul 22, 2012, at 7:52 PM, Jay Reynolds Freeman wrote: > I guess my main problem with all this is that Apple provides [NSSound > isPlaying] with no indication that the method is not general-purpose; reading > the documentation would have you think that it would return a correct answer > no

Re: [NSSound isPlaying] fails to indicate sound termination in Lion

2012-07-22 Thread Jens Alfke
On Jul 22, 2012, at 9:29 PM, Gavin Stokes wrote: > I struggled with this when getting into iOS programming and networking; > everything's asynchronous, and you can't just have your UI locked up. So > what is my app to do while it's waiting? Nothing. Just return from your event handler or whate

Re: [NSSound isPlaying] fails to indicate sound termination in Lion

2012-07-22 Thread Gavin Stokes
> > Asynchronous programming means you'll be called back when things happen, > and in the meantime you should return control so other stuff can run. It > doesn't mean that you should go into an infinite loop trying to force > something async to run synchronously. > That question was rhetorical. T