• 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
[partly OT] Getting ResTypes from NSAttributedString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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


  • Prev by Date: "parse error before 'OBJC_STRING' token" when including evp.h from 10.4u SDK on an Intel machine
  • Next by Date: Re: NSString propertyList crash
  • Previous by thread: "parse error before 'OBJC_STRING' token" when including evp.h from 10.4u SDK on an Intel machine
  • Next by thread: C strings
  • Index(es):
    • Date
    • Thread