• 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
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]

How to implement a control/view that maps to a "String?" (in Swift)


  • Subject: How to implement a control/view that maps to a "String?" (in Swift)
  • From: Daryle Walker <email@hidden>
  • Date: Sat, 04 Jun 2016 15:43:31 -0400

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.)

—
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com

_______________________________________________

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


  • Follow-Ups:
    • Re: How to implement a control/view that maps to a "String?" (in Swift)
      • From: Uli Kusterer <email@hidden>
  • Prev by Date: Re: NSFileWrapper
  • Next by Date: Sorry to ask again, but maybe I'm asking the question incorrectly. Remote Notifications outside app delegate.
  • Previous by thread: Re: Overriding custom KVC methods in Swift?
  • Next by thread: Re: How to implement a control/view that maps to a "String?" (in Swift)
  • Index(es):
    • Date
    • Thread