Re: NSImage/NSImageView opacity (solved)
Re: NSImage/NSImageView opacity (solved)
- Subject: Re: NSImage/NSImageView opacity (solved)
- From: Randall Meadows <email@hidden>
- Date: Mon, 27 Oct 2008 11:23:11 -0600
On Oct 24, 2008, at 10:27 PM, Randall Meadows wrote:
On Oct 24, 2008, at 8:00 PM, Ken Ferry wrote:
Yes, -cacheDisplayInRect:toBitmapImageRep: is going to end up
calling drawRect:. It's not meant to be invoked _from_ drawRect:.
You can call that from another view, or from a controller, or
whatever.
That's what I'm doing; I am calling cacheDisplay... on the
viewToReflect *from* the reflectionView's -drawRect, not its own -
drawRect. But when I do that, reflectionView's -drawRect is called,
not viewToReflect's -drawRect. That's why I said it all seemed so
logical, but the behavior I'm seeing is not.
I am, I *really* am. Trust me. :)
The problem, as it turns out, is that the outlet "viewToReflect" was
attached to the NSView that was *containing* both the reflectionView
and the viewToReflect (for resizing purposes), instead of *just* the
viewToReflect view. Grrrr...the difference in types caused IB to
connect it to the parent view instead, which I didn't notice that,
which was causing the wrong view to be (re)drawn.
(It's amazing what solutions to problems come to me in the shower,
when I'm not even really thinking about the problem...)
Anyway, thanks again, Ken, for the tip to that cacheDisplay... call;
working like a charm now!
randy
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden