• 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
Trouble with knowsPageRank:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trouble with knowsPageRank:


  • Subject: Trouble with knowsPageRank:
  • From: Konni Scheller <email@hidden>
  • Date: Thu, 14 Dec 2006 12:51:59 +0100

Hi,

I've a lot of data sets to print. But I don't know how tall the rect for a data set is until it is printed. This is because a field in the data set can have free text, which could be very long[1], and therefore I don't know how tall is the line until it is
calculated.


So I really don't know the size of the NSView to print until I go thru all of the data sets.

The function *knowsPageRange:* now is the problem. It looks strange to me that I've to do the same calculations twice: one time for *knowsPageRange* and one time the same again for *drawRect:*

Is there a simple way to avoid the double calculations? It looks very inefficient to me.

Regards,
Konni

[1] I solved this by linking a new subview to the printed view. This NSTextView holds the free text and I get the size of this
NSTextView from the corrosponding layoutManager. Better solutions are welcome.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Prev by Date: Re: Cocoa UI
  • Next by Date: Re: what are people using to make their Help doc for their Cocoa app?
  • Previous by thread: Re: Moving subviews to other window
  • Next by thread: Re: Trouble with knowsPageRank:
  • Index(es):
    • Date
    • Thread