Re: Problem with RTF and NSTextView
Re: Problem with RTF and NSTextView
- Subject: Re: Problem with RTF and NSTextView
- From: Kyle Moffett <email@hidden>
- Date: Fri, 14 Nov 2003 18:31:45 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Nov 14, 2003, at 14:16, Brant Sears wrote:
I have an NSTextView and I am trying to invoke writeRTFDToFile:
atomically:
method on this view.
So, I'm calling:
[myTextView writeRTFDToFile:@"/Users/me/desktop/foo.rtf" atomically:
YES];
The result is that I get a folder called "foo.rtf" on my desktop that
contains a file called "TXT.rtf". Why does it force this stupid name
for the
rtf file? Am I doing something wrong here?
RTFD is a directory-encapsulated form of RTF, it allows various
non-text resources to be included in the document. The way this is
handled is by creating a directory "some-file-name-the-user-chose.rtf",
then putting the resources in there. In this case, the only resource
is RTF (not RTFD, that would be redundant) text, hence "TXT.rtf". If
you want just a single file without image support, look for a
"writeRTFToFile" method.
Cheers,
Kyle Moffett
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)
iD8DBQE/tWXiag7LSGnFq10RAgZFAKCcsr5Zprkyt2I9rX5O+WIKVHRdYACgrWCp
wbeJEHIiE7GCD9yPqbb9XOA=
=+XCe
-----END PGP SIGNATURE-----
_______________________________________________
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.