Re: NSView behaves different on 10.4 vs 10.5?
On Jan 29, 2009, at 1:07 PM, Kyle Sluder wrote: On Thu, Jan 29, 2009 at 2:16 PM, Corbin Dunn 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 with QuartzGL... Its a non-issue. With QuartzGL enabled, AppKit is still rendering all of the content for the window, so they can still fully control how overlap happens. -- David Duncan Apple DTS Animation and Printing ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSView behaves different on 10.4 vs 10.5?
On Thu, Jan 29, 2009 at 2:16 PM, Corbin Dunn 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 with QuartzGL... --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSView behaves different on 10.4 vs 10.5?
On Jan 29, 2009, at 8:30 AM, Jesper Storm Bache wrote: It is my understanding that this piece of documentation is out of date, and that on 10.5 and later overlapping sibling views are fully supported. I wouldn't mind having a definitive answer to this question (Apple guys?), because my UI design would need to be completely different depending on this info: Overlapping views work on Leopard, but do not work before that. The documentation is out of date. As far as my experiments show, overlapping views only work if you are using core graphics based views. If you are using NSOpenGLView based views (my test case was actually a mix of opengl and coregraphics based views), then sibling clipping does not work (but container clipping does). Sorry; I should have mentioned there are some exceptions...most notably things with isolated CoreAnimation layer backed view-trees, and gl views. Please do log bugs on any issues you discover. thanks! corbin ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSView behaves different on 10.4 vs 10.5?
It is my understanding that this piece of documentation is out of date, and that on 10.5 and later overlapping sibling views are fully supported. I wouldn't mind having a definitive answer to this question (Apple guys?), because my UI design would need to be completely different depending on this info: Overlapping views work on Leopard, but do not work before that. The documentation is out of date. As far as my experiments show, overlapping views only work if you are using core graphics based views. If you are using NSOpenGLView based views (my test case was actually a mix of opengl and coregraphics based views), then sibling clipping does not work (but container clipping does). Jesper Storm Bache ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSView behaves different on 10.4 vs 10.5?
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 when sibling views overlap." It is my understanding that this piece of documentation is out of date, and that on 10.5 and later overlapping sibling views are fully supported. I wouldn't mind having a definitive answer to this question (Apple guys?), because my UI design would need to be completely different depending on this info: Overlapping views work on Leopard, but do not work before that. The documentation is out of date. I have a group of views, each one with many smaller views inside, which need to be presented in an overlapping manner over the same rect on a window, so that they can be seen through each other. In my preliminary tests, I made each big view a sibling of a single background view. Was planning on bringing each one to the front, when necessary by re-arranging the z-order. Is there any future (or present) in this appoach? That will work on Leopard. corbin ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSView behaves different on 10.4 vs 10.5?
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 piece of documentation is out of date, and that on 10.5 and later overlapping sibling views are fully supported. I wouldn't mind having a definitive answer to this question (Apple guys?), because my UI design would need to be completely different depending on this info: I have a group of views, each one with many smaller views inside, which need to be presented in an overlapping manner over the same rect on a window, so that they can be seen through each other. In my preliminary tests, I made each big view a sibling of a single background view. Was planning on bringing each one to the front, when necessary by re-arranging the z-order. Is there any future (or present) in this appoach? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSView behaves different on 10.4 vs 10.5?
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 if he only plans to support 10.5+? "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 piece of documentation is out of date, and that on 10.5 and later overlapping sibling views are fully supported. I have filed a bug requesting that the documentation be updated/ corrected. Jim ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSView behaves different on 10.4 vs 10.5?
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 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.ht Thanks, Adam On Mon, Jan 19, 2009 at 10:40 PM, Jim Correia wrote: > 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 for > your cards. > > - Jim > > ___ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > 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: > http://lists.apple.com/mailman/options/cocoa-dev/agersonl%40gmail.com > > This email sent to agers...@gmail.com > ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSView behaves different on 10.4 vs 10.5?
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. Thanks, Adam On Mon, Jan 19, 2009 at 11:30 PM, Kyle Sluder wrote: > On Mon, Jan 19, 2009 at 10:45 PM, Graham Cox 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 using that cell to draw the hand inside an NSView > subclass. Then you don't have to worry about sibling view clipping > issues, and you minimize the number of views you have to boot. > > --Kyle Sluder > ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSView behaves different on 10.4 vs 10.5?
On Mon, Jan 19, 2009 at 10:45 PM, Graham Cox 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 using that cell to draw the hand inside an NSView subclass. Then you don't have to worry about sibling view clipping issues, and you minimize the number of views you have to boot. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSView behaves different on 10.4 vs 10.5?
"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 19, 2009 at 10:36 PM, Adam Gerson wrote: > 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 individual playing cards. > > The cards in the hand are drawn overlapping. Everything works fine > under 10.5. Which is to say that when you click on a playing card > nothing happens. We want NOTHING to happen when we click on a card. > Under 10.4 when you click on a card the individual playing card > appears to get redrawn on top of the other cards. You can see an > example in this short screen capture: > > https://dl.getdropbox.com/u/30035/cards.swf > > I have tested this with a verity of built in views and buttons and > cant recreated the mouseDown event causing the subview/NSButton to get > redrawn ontop of other views or buttons layered beneath it. > > Could anyone shed some slight on what could be occurring? > > Thanks, > Adam > ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSView behaves different on 10.4 vs 10.5?
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 get the main view to draw each one. I recall seeing some Apple sample code that implements a variety of card games in a very adaptable way, and also does lots of cool animation. That would probably be a great base for a game like this. Google for 'geekgameboard'. hth, Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSView behaves different on 10.4 vs 10.5?
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 for your cards. - Jim ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com