enhancing NSTextView for optionally-hidden text
enhancing NSTextView for optionally-hidden text
- Subject: enhancing NSTextView for optionally-hidden text
- From: Kurt Bigler <email@hidden>
- Date: Tue, 20 Nov 2012 21:03:58 -0800
NSTextView does exactly what I need in my apps non-editable text view which
functions something like a log, except for one needed function which I can best
envision in the form of a text attribute "hidden", akin to hidden text features
I used to use in the *past* in MS Word, in which it was possible to select a
document-wide option to show or hide hidden text.
(This was something I did in Word pre-OSX. I can not see a way to show hidden
text in the currrent Word that I have from Office 2008. The current version
still has a "hidden" attribute and permits including hidden text when printing.
Word for all I know may not use any native OSX text functionality, so it may
not be very indicative of what to expect is possible.)
In any case what I want is a "hidden" attribute which can be enabled/disabled
for an entire text view. I can not find any such functionality in the
NSTextView documentation, nor any hint of it in the standard text attributes.
Given how this view is used, for appending only in the style of an uneditable
text log permitting user selections and Copy, the easiest way I can think to
implement it is to maintain two text views, one with hidden text included, and
one without, and simply swap the two views to implement show/hide of hidden text.
Is there a better way? I would rather not get deep into a highly-structured
text document kind of model in order to achieve something like this (assuming
that even helps).
-Kurt Bigler
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden