Re: How to use setShowsInvisibleCharacters
Re: How to use setShowsInvisibleCharacters
- Subject: Re: How to use setShowsInvisibleCharacters
- From: Mark Munz <email@hidden>
- Date: Tue, 20 Apr 2004 11:54:16 -0600
I brought this issue up at WWDC (the fact that the APIs to show
invisibles are basically useless). The work around given is similar to
what you mentioned.
I'd also recommend logging a bug about the fact that this API
functionality basically doesn't work so that Apple knows there are
folks interested in it. Perhaps it will inspire them to "fix" it in the
future. Otherwise, they'll never know that people want this.
Mark Munz
On Apr 20, 2004, at 8:59 AM, Glenn Andreas wrote:
At 8:03 PM +0200 4/16/04, Peter Wollschlaeger wrote:
Hello,
I tried to show invisible characters in a text view, but without
success.
Here my code:
- (IBAction)showInvChar:(id)sender
{
NSLayoutManager *layM;
layM = [myTextView layoutManager];
[layM setShowsInvisibleCharacters:YES];
}
Thanks in advance for your help
Peter
It only works for those fonts whose "font book" supports it.
So far as I can tell, there aren't any.
I've overridden -[NSLayoutManager drawGlpyhsForGlyphRange:atPoint:] to
add this (plus other) functionality to IDEKit. Basically, you convert
the glpyh range back to a character range, find which characters are
"invisibile", draw them where their glyphs go (via
lineFramgmentRectForGlyphAtIndex:effectiveRange:), and then call the
superclass to draw the "visible" text.
--
Glenn Andreas email@hidden mondo blobbo,
Cythera, Theldrow, oh my!
Mad, Bad, and Dangerous to Know
_______________________________________________
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.
_______________________________________________
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.