Re: Swift - internal class conforming to public protocol

2015-11-25 Thread Andreas Mayer
> Am 25.11.2015 um 08:13 schrieb Marco S Hyman : > > As I read that adopting a public protocol requires the methods that implement > the protocol to be public (but only those methods). That's not how I read it. And it does not to work that way either. This compiles fine: public protocol Publi

Re: Swift - internal class conforming to public protocol

2015-11-25 Thread Andreas Mayer
> Am 25.11.2015 um 08:56 schrieb Quincey Morris > : > >> That's explained in "Using Swift with Cocoa and Objective-C": >> >> "The compiler does not automatically insert the @objc attribute for >> declarations marked with the private access-level modifier.” > > That can’t be the full explanati

Why can't a Swift method directly access a static member?

2015-11-25 Thread Rick Mann
It seems rather lame that a Swift instance method can't access a static member without prefixing it with the class. Why is this? This is something C++ and Java do just fine. (I have a similar question for Objective-C, which can't access a class method via self). -- Rick Mann rm...@latencyzero

Re: Swift - internal class conforming to public protocol

2015-11-25 Thread Quincey Morris
On Nov 25, 2015, at 00:30 , Andreas Mayer wrote: > > I can't replicate that behavior. Since Roland hasn’t contributed to this thread for 24 hours, I vote we blame *him*. ;) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post a

Re: Swift - internal class conforming to public protocol

2015-11-25 Thread Roland King
> On 25 Nov 2015, at 16:30, Andreas Mayer wrote: > > >> Am 25.11.2015 um 08:56 schrieb Quincey Morris >> : >> >>> That's explained in "Using Swift with Cocoa and Objective-C": >>> >>> "The compiler does not automatically insert the @objc attribute for >>> declarations marked with the privat

Re: Swift - internal class conforming to public protocol

2015-11-25 Thread Roland King
> On 25 Nov 2015, at 16:37, Quincey Morris > wrote: > > On Nov 25, 2015, at 00:30 , Andreas Mayer wrote: >> >> I can't replicate that behavior. > > Since Roland hasn’t contributed to this thread for 24 hours, I vote we blame > *him*. ;) > > I just did - some of us occasionally sleep, I j

Re: Swift - internal class conforming to public protocol

2015-11-25 Thread Roland King
> On 25 Nov 2015, at 16:30, Andreas Mayer wrote: > > >> Am 25.11.2015 um 08:56 schrieb Quincey Morris >> : >> >>> That's explained in "Using Swift with Cocoa and Objective-C": >>> >>> "The compiler does not automatically insert the @objc attribute for >>> declarations marked with the privat

Re: Why can't a Swift method directly access a static member?

2015-11-25 Thread Quincey Morris
On Nov 25, 2015, at 00:34 , Rick Mann wrote: > > It seems rather lame that a Swift instance method can't access a static > member without prefixing it with the class. Why is this? This is something > C++ and Java do just fine. In a technical sense, the reason is probably that Swift allows clas

Re: Why can't a Swift method directly access a static member?

2015-11-25 Thread dangerwillrobinsondanger
In the Objective-C case class methods are methods of the class object. Perhaps your object descends from NSObject? Sent from my iPhone > On Nov 25, 2015, at 6:04 PM, Quincey Morris > wrote: > >> On Nov 25, 2015, at 00:34 , Rick Mann wrote: >> >> It seems rather lame that a Swift instance me

Re: -[NSWindow parentWindow] for sheet never works?

2015-11-25 Thread Graham Cox
> On 25 Nov 2015, at 4:58 PM, Quincey Morris > wrote: > > n the end, I’ve come to the (possibly incorrect) conclusion, and that Graham > misspoke. Yup, I’m a complete idiot. I looked at the docs, saw [NSWindow -endSheet:sheetWindow] and totally misinterpreted it. I might be losing my mind,

Re: Swift - internal class conforming to public protocol

2015-11-25 Thread Charles Srstka
> On Nov 25, 2015, at 12:54 AM, Andreas Mayer wrote: > > And there's no @not-objc modifier. There actually is a @nonobjc modifier. Can’t remember in which release they added it, but it’s there. https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/Interacting

Re: Cocoa-dev Digest, Vol 12, Issue 656

2015-11-25 Thread Michael Domino
Graham, You said, "you close the sheet itself by sending -endSheet to the SHEET, not its parent”. Correct me if I am wrong, but I think you send endSheet: to the parent window, with the sheet window to be dismissed a parameter. Same for the deprecated NSApp method of the same name. The doc say

Re: Why can't a Swift method directly access a static member?

2015-11-25 Thread Rick Mann
> On Nov 25, 2015, at 01:04 , Quincey Morris > wrote: > > In a technical sense, the reason is probably that Swift allows class/static > and instance members to have the same name, presumably because it has to > support Obj-C methods, where the same thing can happen. That means there’s a > da

Re: Fade when changing window's rootViewController possible?

2015-11-25 Thread Ten Horses | Diederik Meijer
Please ignore, managed to solve this 10 minutes after hitting send… On 7 nov. 2015, at 22:30, Diederik Meijer wrote: > Dear list, > > Is it possible to change an iOS app window’s rootViewController at runtime > and have a fade animation between the two states happen? > > Obviously there is