[partly OT] Getting ResTypes from NSAttributedString
[partly OT] Getting ResTypes from NSAttributedString
- Subject: [partly OT] Getting ResTypes from NSAttributedString
- From: Jeremy Dronfield <email@hidden>
- Date: Mon, 20 Mar 2006 10:12:32 +0000
Using NDResourceFork, I'm working on putting styled text into the
resource fork of a disk image (for the purpose of running a licence
agreement, and without relying on DeRez and Rez). I want to be able
to use an NSAttributedString derived from a .rtf file for the actual
licence text. In order to do this, the text must be broken down into
its component string and attributes, which are added to the resource
fork as data with the ResTypes 'TEXT' and 'styl'.
I can add the string as ResType 'TEXT' using -dataUsingEncoding:, but
I'm stumped as to how to put the attributes into the 'styl' ResType.
If there's no Cocoa way to get the attributes into a usable form, can
anyone give me any pointers towards a Carbon way of doing it?
Regards,
Jeremy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden