• 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: NSImageView PICTRepresentation?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImageView PICTRepresentation?


  • Subject: Re: NSImageView PICTRepresentation?
  • From: Robert Clair <email@hidden>
  • Date: Fri, 8 Oct 2004 18:14:33 -0400

Based on your response I assume that NSImage will create an instance of NSBitmapImageRep if I feed NSImage a PICT to begin with and will not create one if any other type is feed to it.


Uh...

Correct if

1) You meant NSPICTImageRep and not NSBitmapImageRep and
2) You didn't, at some point, lock focus on the image without having done [myImage setDataRetained: YES]



That brings up my next assumption/question:

If there may or may not be an instance of NSBitmapImageRep at the time of my drag operation I assume I need to search the NSArray returned by -representations: to find if it exists if I am asked to return PICT data on my pasteboard. I also assume I will have to do the same when I declare types for my pasteboard.


Again I think you mean NSPICTImageRep here. But this is backwards - you won't be
asked by provideDataForType: to provide for data for a type that you didn't declare when you
set up the pasteboard.

Q: Is there an equivalent to NSArray -firstObjectCommonWithArray: for classes (-firstClassCommonWithArray:?) or do I need to roll my own?

Not that I know of, but why make a big deal of it ? Just iterate the array and ask each item what it is -
most images have very few reps, very often just one.

Bob Clair


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: NSImageView PICTRepresentation?
      • From: George Lawrence Storm <email@hidden>
References: 
 >RE: NSImageView PICTRepresentation? (From: Robert Clair <email@hidden>)
 >Re: NSImageView PICTRepresentation? (From: George Lawrence Storm <email@hidden>)

  • Prev by Date: Re: Create .icns file without Photoshop?
  • Next by Date: Toolbar and Brushed Metal background question...
  • Previous by thread: Re: NSImageView PICTRepresentation?
  • Next by thread: Re: NSImageView PICTRepresentation?
  • Index(es):
    • Date
    • Thread