• 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: NSTextView - stopping conversion of quotation marks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView - stopping conversion of quotation marks


  • Subject: Re: NSTextView - stopping conversion of quotation marks
  • From: Graham Cox <email@hidden>
  • Date: Tue, 12 Nov 2013 17:25:39 +0100

On 12 Nov 2013, at 4:19 pm, 2551 <email@hidden> wrote:

> I’m confused. If you select a NSTextView item in IB, then examine the Attributes Inspector, you’re presented with various options for setting text attributes, such as the font, size and color. In my clumsy hands, none of these work. The text entry always defaults to Helvetica 12.0 in standard black.

> Specifically for what I’m trying to accomplish, the text view always convert the quotation characters  " " to “ ” when the user types in the text view, which totally messes up the functionality of my app.

This sounds like the smart quote substitution feature, which has nothing to do with the font or other text attributes. Have a look at [NSTextView setAutomaticQuoteSubstitutionEnabled:].

Depending on how you are loading text into the text view, text attributes set in IB might be overridden. If you are starting with an empty text view that you type into, you will probably want to use -setTypingAttributes: to set the initial font, etc used when typing. However, that setting is pretty fragile, and will need to be performed when the selection changes. I think the cocoabuilder reference you linked discusses this.

> Turning on the Field Editor does stop the conversion, but then restricts me to a single cell/line. How do I stop this automatic re-formatting but retain the ability to enter line breaks?

I really don’t think the Field Editor should come into this - that’s used for entering text into small fields, not when using a complete NSTextView. Forget about that.

—Graham




_______________________________________________

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


  • Follow-Ups:
    • Re: NSTextView - stopping conversion of quotation marks
      • From: 2551 <email@hidden>
    • Re: NSTextView - stopping conversion of quotation marks
      • From: 2551 <email@hidden>
References: 
 >NSTextView - stopping conversion of quotation marks (From: 2551 <email@hidden>)

  • Prev by Date: Re: Cocoa-dev Digest, Vol 10, Issue 735
  • Next by Date: Re: NSTextView - stopping conversion of quotation marks
  • Previous by thread: Re: NSTextView - stopping conversion of quotation marks
  • Next by thread: Re: NSTextView - stopping conversion of quotation marks
  • Index(es):
    • Date
    • Thread