• 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: Question about dataWithPDFInsideRect:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about dataWithPDFInsideRect:


  • Subject: Re: Question about dataWithPDFInsideRect:
  • From: Benjamin Stiglitz <email@hidden>
  • Date: Fri, 12 Sep 2008 12:29:16 -0400

Suppose I have a model (myModel) and its view (myModelView) which is a subclass of NSView. myModel has an update method that updates the model, and changes in the view are all drawn inside the drawRect: method of myModelView. If I have the following sequence:

[ myModel update ];
[ myModelView setNeedsDisplay: YES ];
myModelViewData = [ myModelView dataWithPDFInsideRect: [ myModelView bounds ] ];


Is the data I get back from dataWithPDFInsideRect: guaranteed to reflect the last changes that stem from [ myModel update ]? Or is it possible that I might get data that's essentially cached from a view of the model from some previous state? Hope that makes sense.

Yes; -[NSView dataWithPDFInsideRect:] will create a PDF graphics context and eventually end up calling -[NSView drawRect:] with the passed bounds.


-Ben
_______________________________________________

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: 
 >Question about dataWithPDFInsideRect: (From: Chris Goedde <email@hidden>)

  • Prev by Date: NSBezierPath lineToPoint: Rate
  • Next by Date: Two Dimensional Array
  • Previous by thread: Question about dataWithPDFInsideRect:
  • Next by thread: NSBezierPath lineToPoint: Rate
  • Index(es):
    • Date
    • Thread