• 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: Validating NSButton in Swift
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Validating NSButton in Swift


  • Subject: Re: Validating NSButton in Swift
  • From: email@hidden
  • Date: Tue, 15 Dec 2015 08:24:43 +0900

Glad that worked. I'll also file some docs bugs.

Another way to do this is to implement a controller or container that handles it.

View controllers are in the responder chain and can act as the item that needs validation and set the control properties.
We can also look at the design of toolbar items and menu items as containers for views, so they can do a similar job.

These approaches might let you avoid some control subclassing (depending on what else you need to do) and might let you stay in swift.

Sent from my iPhone

> On Dec 15, 2015, at 6:56 AM, Luc Van Bogaert <email@hidden> wrote:
>
>
>>> On 14 Dec 2015, at 22:51, Roland King <email@hidden> wrote:
>>>
>>>
>>>> On 15 Dec 2015, at 04:10, Luc Van Bogaert <email@hidden> wrote:
>>>
>>>
>>> I tried what you suggested and made a button subclass and just declared conformance in objective-c, and then imported the class into Swift.
>>> This seems to do the trick, my button subclass is now accepted as conforming to the protocol.
>>> Thanks!
>>
>> Good - If you can find 5 minutes I really would suggest filing a bug report on it, it’s nice to be able to work around it for now but it’s something needs to get fixed, the protocol definition is inconsistent in Objective C (defined as properties, implemented as functions) and that needs cleaning up or special-casing.
>
> Done it already.
>
> --
> Luc Van Bogaert
_______________________________________________

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: 
 >Validating NSButton in Swift (From: Luc Van Bogaert <email@hidden>)
 >Re: Validating NSButton in Swift (From: Quincey Morris <email@hidden>)
 >Re: Validating NSButton in Swift (From: Luc Van Bogaert <email@hidden>)
 >Re: Validating NSButton in Swift (From: Roland King <email@hidden>)
 >Re: Validating NSButton in Swift (From: Quincey Morris <email@hidden>)
 >Re: Validating NSButton in Swift (From: email@hidden)
 >Re: Validating NSButton in Swift (From: Roland King <email@hidden>)
 >Re: Validating NSButton in Swift (From: Luc Van Bogaert <email@hidden>)
 >Re: Validating NSButton in Swift (From: Roland King <email@hidden>)
 >Re: Validating NSButton in Swift (From: Luc Van Bogaert <email@hidden>)

  • Prev by Date: Re: Validating NSButton in Swift
  • Next by Date: Re: Unknown segue relationship: Prototype
  • Previous by thread: Re: Validating NSButton in Swift
  • Next by thread: Unknown segue relationship: Prototype
  • Index(es):
    • Date
    • Thread