Re: Validating NSButton in Swift

2015-12-14 Thread Quincey Morris
On Dec 13, 2015, at 23:53 , Roland King wrote: > > You appear to be a little out of luck here because I was afraid that was going to be the answer. I suspect the problem is the Swift Obj-C importer, rather than any misguided SDK intention, because there are also a *lot* of accessibility prope

Re: Validating NSButton in Swift

2015-12-14 Thread dangerwillrobinsondanger
The bug should be that it gives you a wrong message, because it already conforms to the protocol because it inherits from a class that conforms to the protocol. All you should have to do is implement an override of the methods to do custom stuff or of the properties. You shouldn't declare con

Re: Validating NSButton in Swift

2015-12-14 Thread Quincey Morris
On Dec 14, 2015, at 01:12 , dangerwillrobinsondan...@gmail.com wrote: > > because it inherits from a class that conforms to the protocol NSControl conforms informally (that is, it has the requisite methods) but not formally, which isn’t conformance in Swift terms. But there’s still a conflict b

Re: Validating NSButton in Swift

2015-12-14 Thread Roland King
> On 14 Dec 2015, at 17:12, dangerwillrobinsondan...@gmail.com wrote: > > The bug should be that it gives you a wrong message, because it already > conforms to the protocol because it inherits from a class that conforms to > the protocol. > > All you should have to do is implement an override

Unknown segue relationship: Prototype

2015-12-14 Thread Rick Mann
I'm getting this error since adding an NSCollectionView to my Storyboard in Xcode 7.2 (on OS X 10.10.5). It also added a prototype relationship to the NSCollectionViewItem. Googling, this appeared to be a problem with Xcode 6b, but persists in 7.1 beta versions. I'm not sure if it's still a pro

Re: Validating NSButton in Swift

2015-12-14 Thread dangerwillrobinsondanger
Oh right. So this is a clever one. The key in the docs might be the responder chain mentions. The control doesn't have to validate itself. On the contrary, usually some controller validates. The control generally should know about state elsewhere. Sent from my iPhone > On Dec 14, 2015, at 6:

Re: Validating NSButton in Swift

2015-12-14 Thread dangerwillrobinsondanger
Yeah this was one of those little stumpers. The control implements the methods to be eligible for being validated but shouldn't validate itself. A controller or something else in the responder chain that knows about app state should do validation. The docs should be bugged. Sent from my iP

Problem loading a CoreDataModel from a Static library in Swift

2015-12-14 Thread Jim Adams
Not sure where to ask this question. I just started trying Swift to see how my company’s SDK could be integrated. I am getting this error: CoreData: Failed to load optimized model at path …/modle.omo’ This is a static library with an associated bundle that contains the CoreData model. ObjC works

UIAdaptivePresentations with EventKitUI

2015-12-14 Thread Daniel Phillips
I am having some trouble using adaptive presentations with EventKitUI, I am implementing a feature which allows my users to add an event to their calendar. I have imported EventKitUI framework and I am presenting an EKEventEditViewController. On iPad it’s shown But I would like to show this us

Re: Validating NSButton in Swift

2015-12-14 Thread Luc Van Bogaert
> On 14 Dec 2015, at 10:27, Roland King wrote: > > >> On 14 Dec 2015, at 17:12, dangerwillrobinsondan...@gmail.com wrote: >> >> The bug should be that it gives you a wrong message, because it already >> conforms to the protocol because it inherits from a class that conforms to >> the protoco

Sandboxed and non-sandboxed targets

2015-12-14 Thread David Durkee
I am trying to make a sandboxed and a nonsandboxed version of my Mac application so that I can sell a version in the Mac App Store but also sell a version on my website. I have created different targets in my project for this. I thought this was working OK, but I recently noticed that my target

Re: Sandboxed and non-sandboxed targets

2015-12-14 Thread David Durkee
I may have found the answer. Under Build Settings for the target, in the Code Signing section, Code Signing Entitlements was still pointing to the entitlements file. When I removed it for the nonsandbox target, it seemed to solve the problem. Both targets are building as expected now. David >

Re: Validating NSButton in Swift

2015-12-14 Thread Roland King
> On 15 Dec 2015, at 04:10, Luc Van Bogaert 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 pr

Re: Validating NSButton in Swift

2015-12-14 Thread Luc Van Bogaert
> On 14 Dec 2015, at 22:51, Roland King wrote: > > >> On 15 Dec 2015, at 04:10, Luc Van Bogaert > > wrote: >>> >> >> >> I tried what you suggested and made a button subclass and just declared >> conformance in objective-c, and then imported the class into Swif

Re: Validating NSButton in Swift

2015-12-14 Thread dangerwillrobinsondanger
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 toolb

Re: Unknown segue relationship: Prototype

2015-12-14 Thread Andreas Mayer
> Am 14.12.2015 um 10:48 schrieb Rick Mann : > > Googling, this appeared to be a problem with Xcode 6b, but persists in 7.1 > beta versions. I'm not sure if it's still a problem. Is there any way around > it? > > > http://stackoverflow.com/questions/25123365/unknown-segue-relationship-p

Implementing some .swift class methods in .mm file?

2015-12-14 Thread Rick Mann
I need to interface with some C++ code. I can readily make an Objective-C++ class file and access that class from Swift. But I'd like to instead make a Swift class, and just put some additional method definitions in a .mm file. However, the Swift compiler doesn't see those. So, I realized it ne

Re: Unknown segue relationship: Prototype

2015-12-14 Thread Rick Mann
> On Dec 14, 2015, at 16:01 , Andreas Mayer wrote: > > >> Am 14.12.2015 um 10:48 schrieb Rick Mann : >> >> Googling, this appeared to be a problem with Xcode 6b, but persists in 7.1 >> beta versions. I'm not sure if it's still a problem. Is there any way around >> it? >> >> >> http://