• 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
Conceptual question about XML and NSTextStorage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Conceptual question about XML and NSTextStorage


  • Subject: Conceptual question about XML and NSTextStorage
  • From: Kaelin Colclasure <email@hidden>
  • Date: Tue, 30 Dec 2003 10:56:22 -0800

I am considering putting together a Cocoa application for editing a specific dialect of XML documents that are comprised mostly of text. In order to make editing the XML more friendly to the application users, I want to hide the tags in the main editing view, and instead show them in a smaller tag view at the bottom of the window.

My first impulse is to explore representing the tags internally as attributes. In other words, the contents of my NSTextStorage will consist of only the text inside of the tags, with the tags attached to the appropriate text ranges in attributes. This would seem to have the benefit of requiring the least customization of the editing NSTextView.

Another alternative, though, would be to have the tags present as part of the text -- but hidden with an attribute that implements some kind of text folding behavior.

I'm a complete n00b with the Cocoa text system here, so I'm looking for advice / discussion on the tradeoffs between these alternatives -- or better still, a suggestion I haven't thought of that's superior to either. :-)

-- Kaelin
_______________________________________________
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.

  • Prev by Date: Clickable textfields ...
  • Next by Date: Multiple declarations for method length
  • Previous by thread: Re: Clickable textfields ...
  • Next by thread: Multiple declarations for method length
  • Index(es):
    • Date
    • Thread