• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSImage/NSImageView opacity (solved)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSImage/NSImageView opacity (From: Randall Meadows <email@hidden>)
 >Re: NSImage/NSImageView opacity (From: "Ken Ferry" <email@hidden>)
 >Re: NSImage/NSImageView opacity (From: Randall Meadows <email@hidden>)
 >Re: NSImage/NSImageView opacity (From: "Ken Ferry" <email@hidden>)
 >Re: NSImage/NSImageView opacity (From: Randall Meadows <email@hidden>)

  • Prev by Date: Re: Not so long filenames
  • Next by Date: Re: Leaking CGColor objects
  • Previous by thread: Re: NSImage/NSImageView opacity
  • Next by thread: File event notification
  • Index(es):
    • Date
    • Thread