That's what I get for assuming. :) I figured text fields were for editing text, 
and text views were for displaying it. Needless to say, I was completely and 
profoundly wrong! This text view and related pieces are doing precisely what I 
wanted; spellcheck, substitutions, no selecting when the app inserts text, etc. 
I can even support tab and enter for moving/submitting by making my view 
controller the delegate!

My only remaining wonder is about setting the accessibilityHelp property, which 
is giving me the same error it always has: self is immutable. This isn't a 
show-stopper, but it would be really nice to be able to change this according 
to different user actions.
> On Sep 15, 2015, at 13:20, Jens Alfke <[email protected]> wrote:
> 
> 
>> On Sep 15, 2015, at 9:11 AM, Alex Hall <[email protected]> wrote:
>> 
>> * When I call myField.stringValue="some text", that string ("some text") 
>> appears as expected, but it's highlighted. That means that, when the user 
>> starts typing, it disappears, defeating the purpose of the app putting it 
>> there for the user in the first place.
> 
> That’s the standard behavior for text fields. It lets the user tab through a 
> dialog box and either accept the default value or quickly type in a new one.
> 
>> * My field currently doesn't allow spellchecking or auto-correct, but I want 
>> it to. I don't see that option anywhere in the inspectors, for the field or 
>> its child cell.
> 
> This is probably a side effect of the fact that all text fields (and text 
> cells in general) in the window share the same NSTextView, called the “field 
> editor”. So by default they’re using the characteristics of that view.
> 
> You can override either of those behaviors, but it sounds like you may want 
> to use an NSTextView instead of an NSTextField in your UI, since its behavior 
> isn’t typical and you want to enable extra features.
> 
> —Jens
> 


--
Have a great day,
Alex Hall
[email protected]


_______________________________________________

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