• 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: Setting resolution of images in NSTextView - [SOLVED?]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting resolution of images in NSTextView - [SOLVED?]


  • Subject: Re: Setting resolution of images in NSTextView - [SOLVED?]
  • From: Douglas Davidson <email@hidden>
  • Date: Fri, 30 Apr 2004 10:00:02 -0700

On Apr 30, 2004, at 3:57 AM, Jeremy Dronfield wrote:

Well, I've solved this issue, but the solution raises another question. I decided to go ahead and use [[myAttachment attachmentCell] image] to access the image, even though -image supposedly isn't implemented in the attachment cell protocol. Sure enough, I got the compiler warning:

warning: `-image' not implemented by protocol(s)

However, I ploughed on regardless, setting the image rep size to pixel size. Lo and behold, it works! Images dropped into my text view display at their pixel size instead of dpi. So, is this a compiler bug? (I'm still using Xcode 1.1, so I'd be interested to know if the warning still occurs in 1.2.)

An attachment cell isn't required to have an image, or even an image method, but in most cases the cell used will have an image. Try checking respondsToSelector: and using a cast to prevent the compiler warning.

Douglas Davidson
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Setting resolution of images in NSTextView (From: Jeremy Dronfield <email@hidden>)
 >Re: Setting resolution of images in NSTextView - [SOLVED?] (From: Jeremy Dronfield <email@hidden>)

  • Prev by Date: Re: Getting updated insertion point from NSDraggingInfo
  • Next by Date: window resizing events
  • Previous by thread: Re: Setting resolution of images in NSTextView - [SOLVED?]
  • Next by thread: Crash in setTextColor
  • Index(es):
    • Date
    • Thread