FINAL SOLUTION Re: What's the best way saving a string into PDF?
FINAL SOLUTION Re: What's the best way saving a string into PDF?
- Subject: FINAL SOLUTION Re: What's the best way saving a string into PDF?
- From: Thilo Ettelt <email@hidden>
- Date: Wed, 31 Jul 2002 00:35:51 +0200
I have found the ultimate final solution now!
I had to split my method into two:
----------------------------------
/|
/ |
/ |
|
| O Method
Programmatically entering data in an NSTextView with -setString.
Unfortunately the setString/drawing method seems to be threaded (and too
lame). That's why I had to do the PDF printing (to a data object) in a
different method.
_____
/ )
/
/
/
(______ O Method
In my 2nd method I printed the content of the NSTextView into a data
object using NSPrintOperation. But how do I call this method when the
drawing in method 1 is so slow and threaded? Well, I use the following
code:
[self performSelector:@selector(printNewsPDF) withObject:nil
afterDelay:0];
It will execute my second method in the next run loop. That's it.
But one question to Apple and all the geeks: how could *I* find the
solution? I'm still something like a Cocoa newbie. Needing to solve such
a problem is the worst what can happen IMHO! Where's the "Cocoa" in
there?
However, now that it's solved:
Have a nice day-
Cheers, Thilo
_______________________________________________
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.