Re: NSView behaves different on 10.4 vs 10.5?

2009-01-29 Thread Carlos Eduardo Mello
On Jan 29, 2009, at 12:56 AM, Jim Correia wrote: On Jan 28, 2009, at 9:44 PM, Adam Gerson wrote: For performance reasons, Cocoa does not enforce clipping among sibling views or guarantee correct invalidation and drawing behavior when sibling views overlap. It is my understanding that this

Re: NSView behaves different on 10.4 vs 10.5?

2009-01-29 Thread Corbin Dunn
Le Jan 29, 2009 à 5:13 AM, Carlos Eduardo Mello a écrit : On Jan 29, 2009, at 12:56 AM, Jim Correia wrote: On Jan 28, 2009, at 9:44 PM, Adam Gerson wrote: For performance reasons, Cocoa does not enforce clipping among sibling views or guarantee correct invalidation and drawing behavior

Re: NSView behaves different on 10.4 vs 10.5?

2009-01-29 Thread Kyle Sluder
On Thu, Jan 29, 2009 at 2:16 PM, Corbin Dunn corb...@apple.com wrote: Sorry; I should have mentioned there are some exceptions...most notably things with isolated CoreAnimation layer backed view-trees, and gl views. Hrmm, that makes me wonder what happens if one uses overlapping sibling views

Re: NSView behaves different on 10.4 vs 10.5?

2009-01-29 Thread David Duncan
On Jan 29, 2009, at 1:07 PM, Kyle Sluder wrote: On Thu, Jan 29, 2009 at 2:16 PM, Corbin Dunn corb...@apple.com wrote: Sorry; I should have mentioned there are some exceptions...most notably things with isolated CoreAnimation layer backed view-trees, and gl views. Hrmm, that makes me

Re: NSView behaves different on 10.4 vs 10.5?

2009-01-28 Thread Adam Gerson
According to the documentation its not exactly recommended to use them in 10.5 either, even though it appears to draw just fine in 10.5. If my client wants to keep overlapping sibling views to save the time of refactoring is this a terrible idea if he only plans to support 10.5+? For performance

Re: NSView behaves different on 10.4 vs 10.5?

2009-01-28 Thread Jim Correia
On Jan 28, 2009, at 9:44 PM, Adam Gerson wrote: According to the documentation its not exactly recommended to use them in 10.5 either, even though it appears to draw just fine in 10.5. If my client wants to keep overlapping sibling views to save the time of refactoring is this a terrible idea

Re: NSView behaves different on 10.4 vs 10.5?

2009-01-21 Thread Adam Gerson
Hey Kyle, Thanks for the suggestion. Can you tell me more about this idea. It doesn't look like I can set an NSButton's NSButtonCell and NSButtonCell isn't a child of NSView so I can't draw it directly as a sub view. Once I have my sub class of NSButtonCell how do I render into onto the screen.

NSView behaves different on 10.4 vs 10.5?

2009-01-19 Thread Adam Gerson
I am trying to help someone solve a problem with their code. I did not write the code myself. As far as I can tell they have a custom NSView subclass that has some subviews. The view represents a hand of playing cards. The subviews themselves are custom NSButton subclasses that represent

Re: NSView behaves different on 10.4 vs 10.5?

2009-01-19 Thread Jim Correia
On Jan 19, 2009, at 10:36 PM, Adam Gerson wrote: The cards in the hand are drawn overlapping. [...] Could anyone shed some slight on what could be occurring? Overlapping sibling views are supported on 10.5 and later. If you need to support 10.4, you'll have to use a different strategy

Re: NSView behaves different on 10.4 vs 10.5?

2009-01-19 Thread Graham Cox
On 20 Jan 2009, at 2:36 pm, Adam Gerson wrote: The cards in the hand are drawn overlapping. Could anyone shed some slight on what could be occurring? 10.4 doesn't support overlapping views. Using a separate view for each card is a bad idea anyway. Instead, just use a custom object and

Re: NSView behaves different on 10.4 vs 10.5?

2009-01-19 Thread Adam Gerson
For performance reasons, Cocoa does not enforce clipping among sibling views or guarantee correct invalidation and drawing behavior when sibling views overlap. http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaViewsGuide/WorkingWithAViewHierarchy/chapter_5_section_5.html On Mon, Jan

Re: NSView behaves different on 10.4 vs 10.5?

2009-01-19 Thread Kyle Sluder
On Mon, Jan 19, 2009 at 10:45 PM, Graham Cox graham@bigpond.com wrote: Using a separate view for each card is a bad idea anyway. Instead, just use a custom object and get the main view to draw each one. I'd recommend abstracting out the card-drawing code into a subclass of NSButtonCell and