Re: How to implement a control/view that maps to a "String?" (in Swift)
Re: How to implement a control/view that maps to a "String?" (in Swift)
- Subject: Re: How to implement a control/view that maps to a "String?" (in Swift)
- From: Uli Kusterer <email@hidden>
- Date: Sun, 05 Jun 2016 16:10:13 +0200
On 04 Jun 2016, at 21:43, Daryle Walker <email@hidden> wrote:
> I guess I could implement a “String” property with a NSTextView. What about a “String?” though. NIL and empty strings are distinct in the model, and I’ll like to reflect that in the document window too. (Although no one but me would pick a NIL option over an empty text-view and string.) I was thinking of a tab-view, one pane with the text view, and the other with a placard saying there is no text section yet and a button to add one. (I would have a menu item to remove the section, to edit the other way.)
>
> Is this a good way to present in the window? Any gotchas? (Oh, this is on OS X and I’m using storyboards.)
I'd just put a checkbox in front of the field. Check it off to mean NIL, check it on to enable and edit the text field.
Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://stacksmith.org
_______________________________________________
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