Yes, you are correct - I was just drawing the frame of the accessory view as a 
sanity check, and it worked as expected.

It turns out that the problem is with the 10.7+ overlay scroller drawing. If I 
return NO from +isCompatibleWithOverlayScrollers then it all works as expected. 
If I return YES, then my subview is not drawn. The subview is present as a 
subview of the scroll view and in the right place, but not shown.

Any ideas?


Regards

Gideon




On 08/07/2012, at 7:08 AM, Andy Lee <ag...@mac.com> wrote:

> I took that to mean he was drawing the frame of the accessory view with 
> something like NSFrameRect(), not sending a draw message to the accessory 
> view. Come to think of it, this answers one of my questions. Assuming the 
> test code is something like...
> 
>    // Sanity-check the frame of the accessory view.
>    [[NSColor redColor] set];
>    NSFrameRect([accessoryView frame]);
> 
> ...it would appear the accessory view has the right frame. My only remaining 
> question then is to confirm that the accessory view really is a subview of 
> the NSScroller, which is easily checked with a breakpoint in the above code.
> 
> When is the superview-subview relationship established? Is *that* code 
> getting called?
> 
> --Andy
> 
> On Jul 7, 2012, at 4:23 PM, Kyle Sluder wrote:
> 
>> On Jul 7, 2012, at 1:38 AM, Gideon King <gid...@novamind.com> wrote:
>> 
>>> 
>>> I overrode the drawSelf: method and got it to draw the frame of the 
>>> accessory view, to make sure it was positioned correctly, and it drew in 
>>> the right place.
>> 
>> Wait, you told another view to draw from within a separate view's 
>> -drawRect:? That's not going to work; the coordinate systems aren't set up 
>> right.
>> 
>> --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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to