Trouble with knowsPageRank:
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