• 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
Re: How to use setShowsInvisibleCharacters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >NSDisclosureButton (From: Pedro Campos <email@hidden>)
 >How to use setShowsInvisibleCharacters (From: Peter Wollschlaeger <email@hidden>)
 >Re: How to use setShowsInvisibleCharacters (From: Glenn Andreas <email@hidden>)

  • Prev by Date: RE: [little OT] Licensing/Implementing in Cocoa/Obj-C
  • Next by Date: Using a field editor
  • Previous by thread: Re: How to use setShowsInvisibleCharacters
  • Next by thread: Re: [now OT] Licensing/Implementing in Cocoa/Obj-C - Interest in product?
  • Index(es):
    • Date
    • Thread