Re: Can't use +initialize, now what?

2017-03-30 Thread Saagar Jha
+1 to this idea as well. This works for cases where stuff like awakeFromNib and didFinishLaunching aren’t available, like plugins. Saagar Jha > On Mar 30, 2017, at 03:39, Jonathan Hull wrote: > > >> On Mar 29, 2017, at 4:24 PM, Charles Srstka wrote:

Re: Can't use +initialize, now what?

2017-03-30 Thread Jonathan Hull
> On Mar 29, 2017, at 4:24 PM, Charles Srstka wrote: > >> On Mar 29, 2017, at 3:41 PM, Greg Parker wrote: >> >>> On Mar 29, 2017, at 9:02 AM, Charles Srstka >> > wrote: >>> On Mar

Re: Can't use +initialize, now what?

2017-03-30 Thread Alastair Houghton
On 29 Mar 2017, at 21:17, Jens Alfke wrote: > >> On Mar 29, 2017, at 10:52 AM, Quincey Morris >> wrote: >> >> If willFinishLaunching is not early enough, then you can put code in your >> “main” function, but I don’t know how feasible

Re: Can't use +initialize, now what?

2017-03-29 Thread Charles Srstka
> On Mar 29, 2017, at 3:41 PM, Greg Parker wrote: > >> On Mar 29, 2017, at 9:02 AM, Charles Srstka > > wrote: >> >>> On Mar 29, 2017, at 10:51 AM, Jens Alfke >> >

Re: Can't use +initialize, now what?

2017-03-29 Thread Greg Parker
> On Mar 29, 2017, at 10:52 AM, Quincey Morris > wrote: > > Incidentally, there have always been other problems with using +initialize. > You don’t know how many times it will be called, since it’s called once for > each class, and it may be inherited

Re: Can't use +initialize, now what?

2017-03-29 Thread Greg Parker
> On Mar 29, 2017, at 9:02 AM, Charles Srstka wrote: > >> On Mar 29, 2017, at 10:51 AM, Jens Alfke wrote: >> >>> On Mar 29, 2017, at 6:57 AM, Daryle Walker >> > wrote: >>> >>> Now the new Xcode release

Re: Can't use +initialize, now what?

2017-03-29 Thread Jens Alfke
> On Mar 29, 2017, at 10:52 AM, Quincey Morris > wrote: > > If willFinishLaunching is not early enough, then you can put code in your > “main” function, but I don’t know how feasible that is in Swift. Another trick to run stuff earlier at launch is to add

Re: Can't use +initialize, now what?

2017-03-29 Thread Quincey Morris
On Mar 29, 2017, at 06:57 , Daryle Walker wrote: > > Sometimes, I see something in Apple’s AppKit/Foundation reference site that > mentions that their technique should be loaded early in the program by > putting it in the class’s “+initiallize” method. So there are actually

Re: Can't use +initialize, now what?

2017-03-29 Thread Charles Srstka
> On Mar 29, 2017, at 10:51 AM, Jens Alfke wrote: > >> On Mar 29, 2017, at 6:57 AM, Daryle Walker > > wrote: >> >> Sometimes, I see something in Apple’s AppKit/Foundation reference site that >> mentions that their technique should

Re: Can't use +initialize, now what?

2017-03-29 Thread Jens Alfke
> On Mar 29, 2017, at 6:57 AM, Daryle Walker wrote: > > Sometimes, I see something in Apple’s AppKit/Foundation reference site that > mentions that their technique should be loaded early in the program by > putting it in the class’s “+initiallize” method. A +initialize

Can't use +initialize, now what?

2017-03-29 Thread Daryle Walker
Sometimes, I see something in Apple’s AppKit/Foundation reference site that mentions that their technique should be loaded early in the program by putting it in the class’s “+initiallize” method. Now the new Xcode release notes say that “• Swift now warns when an NSObject subclass attempts to