• 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: How to implement a control/view that maps to a "String?" (in Swift)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >How to implement a control/view that maps to a "String?" (in Swift) (From: Daryle Walker <email@hidden>)

  • Prev by Date: Re: NSFileWrapper
  • Next by Date: Re: NSFileWrapper
  • Previous by thread: How to implement a control/view that maps to a "String?" (in Swift)
  • Next by thread: Sorry to ask again, but maybe I'm asking the question incorrectly. Remote Notifications outside app delegate.
  • Index(es):
    • Date
    • Thread