> On Sep 15, 2015, at 13:20, Jens Alfke <j...@mooseyard.com> wrote: > > >> On Sep 15, 2015, at 9:11 AM, Alex Hall <mehg...@icloud.com> 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.
Makes sense. In this app, though, I want to put focus on the field (that is, becomeFirstResponder()) then put the cursor after the text the app inserted, letting the user continue typing after it without typing *over* it. > >> * 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. I'll look into that. I didn't realize a text view could be editable. Thanks. > > —Jens > -- Have a great day, Alex Hall mehg...@icloud.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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 arch...@mail-archive.com