On 12 Nov 2013, at 4:19 pm, 2551 <[email protected]> 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 protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to