Cocoa Text System and Attributed Strings
Cocoa Text System and Attributed Strings
- Subject: Cocoa Text System and Attributed Strings
- From: Alan Smith <email@hidden>
- Date: Thu, 2 Feb 2006 19:29:46 +0000
Hi everyone,
I work for a company that primarily develops .NET applications for
Windows. I am investigating the possibility of porting one of our
flagship products from Windows to the Mac. I really just wanted a bit
of advice and perhaps a prod in the right direction before I start
any work. I've dabbled with Cocoa and am quite a fan, but have never
done anything this ambitious before.
The application in question is basically a specialised word
processor. The Windows version uses a subclassed MS RTF control.
The major editor functionality I need to be able to port is as follows:
A document in our editor appears as a series of paragraphs. The user
edits a paragraph at a time, the active paragraph is indicated by
modifying its colour (it's grey when it's inactive and black when
it's active). Behind the scenes in the Windows version, paragraphs
are indicated in the RTF using hidden text (\v in the MS RTF
specification). In most cases each paragraph is un-editable
(protected). The only portions that are editable are fields within
the paragraphs (again marked by hidden characters). There is further
hidden information within the paragraph to indicate which paragraph
is being edited so we can update an object model as the paragraph is
modified.
I've had a good look at the documentation of the Cocoa Text System
and believe it is more than capable of pulling off what I need. My
gut thought is that Attributed String programming will help me out
with all of the above. I'm just worried that I'll have to do some
serious subclassing of the TextStorage component so that I can embed
a few markers within the RTF string...unless there is a better way of
course!
Thanks in advance for any help or advice,
Alan
_______________________________________________
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