|Jan 5, 2012, 10:27 AM||#1|
Help with text formatting in an NSTextView
I'm pretty inexperienced with Objective-C & Cocoa, but learning fast! I'm working on an app that needs to parse XML files, and format some text according to a few pseudo-HTML tags, such as <body>content</body> and <heading>content</heading> etc.
I've been doing some command-line app experiments with the NSXML API (NSXMLNode, NSXMLDocument, NSXMLElement etc.) and I'm happy about reading, writing, creating, parsing etc. an XML document.
What I'm not sure of is, once I've extracted the data from the XML document and got a tree of XML objects, how to format the text in the NSTextView, and also how to detect which ranges of text in the NSTextView are in what size, font weight etc.
Could somebody please point me towards the appropriate classes etc, and I'll try and work it out from the Apple docs.
|Jan 5, 2012, 03:20 PM||#2|
These guides should get you started:
Text System Overview
Cocoa Text Architecture Guide
Text System User Interface Layer Programming Guide
Attributed String Programming Guide
Text Layout Programming Guide
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Formatting text file in AppleScript||dam316||Mac Programming||1||May 5, 2014 10:21 AM|
|changing NSTextView string value||abcdefg12345||Mac Programming||4||Feb 5, 2014 06:50 AM|
|vBulletin text formatting BB code error.||Anonymous Freak||Site and Forum Feedback||1||Dec 20, 2013 11:22 AM|
|Edit Specific Text In NSTextView||jpeezy||Mac Programming||0||Mar 20, 2013 10:16 AM|
All times are GMT -5. The time now is 05:16 PM.