Re: transition custom views

2017-08-10 Thread Quincey Morris
On Aug 10, 2017, at 11:38 , J.E. Schotsman wrote: > > No, it’s a xib-based app. I think it’s a bit harder, because with a storyboard you can use segues, and set them up in IB. With the proviso that I haven’t tried what I’m about to suggest, here’s how I understand what

Re: transition custom views

2017-08-10 Thread J.E. Schotsman
> On 10 Aug 2017, at 19:38, Quincey Morris > wrote: > > On Aug 10, 2017, at 08:36 , J.E. Schotsman wrote: >> >> I would like to use the transition(from:to:options:completionHandler:) >> method of NSViewController but the tab view

Re: transition custom views

2017-08-10 Thread Quincey Morris
On Aug 10, 2017, at 08:36 , J.E. Schotsman wrote: > > I would like to use the transition(from:to:options:completionHandler:) > method of NSViewController but the tab view item's viewController property is > nil. Are you using a storyboard for the window?

Re: Is "-init" really needed?

2017-08-10 Thread Jean-Daniel
> Le 10 août 2017 à 16:09, Charles Srstka a écrit : > >> On Aug 10, 2017, at 8:59 AM, Alastair Houghton >> wrote: >> >> On 10 Aug 2017, at 14:57, gerti-cocoa...@bitart.com >> wrote: >>> >>> On Aug

transition custom views

2017-08-10 Thread J.E. Schotsman
Hello, In a Mac app I have a window with a tab view. One of the tabs contains custom views between which the user can switch with a popup menu. I would like to use the transition(from:to:options:completionHandler:) method of NSViewController but the tab view item's viewController property is

Re: Is "-init" really needed?

2017-08-10 Thread John McCall
> On Aug 10, 2017, at 11:13 AM, Charles Srstka wrote: >> On Aug 10, 2017, at 9:44 AM, Alastair Houghton >> wrote: >> >> On 10 Aug 2017, at 15:24, Jeremy Hughes > > wrote:

Re: Is "-init" really needed?

2017-08-10 Thread Charles Srstka
> On Aug 10, 2017, at 9:44 AM, Alastair Houghton > wrote: > > On 10 Aug 2017, at 15:24, Jeremy Hughes > wrote: >> >>> On 10 Aug 2017, at 15:15, Alastair Houghton >>

Re: Is "-init" really needed?

2017-08-10 Thread Alastair Houghton
On 10 Aug 2017, at 15:24, Jeremy Hughes wrote: > >> On 10 Aug 2017, at 15:15, Alastair Houghton >> wrote: >> >> On 10 Aug 2017, at 15:09, Charles Srstka wrote: >>> >>> They’re equivalent syntactically, but

Re: Is "-init" really needed?

2017-08-10 Thread Jeremy Hughes
> On 10 Aug 2017, at 15:15, Alastair Houghton > wrote: > > On 10 Aug 2017, at 15:09, Charles Srstka wrote: >> >> They’re equivalent syntactically, but performance-wise, +array and friends >> will cause the object to be put into an

Re: Is "-init" really needed?

2017-08-10 Thread Alastair Houghton
On 10 Aug 2017, at 15:09, Charles Srstka wrote: > > They’re equivalent syntactically, but performance-wise, +array and friends > will cause the object to be put into an autorelease pool. Therefore, +new is > better for performance. Not with ARC they don’t. The ARC

Re: Is "-init" really needed?

2017-08-10 Thread Charles Srstka
> On Aug 10, 2017, at 8:59 AM, Alastair Houghton > wrote: > > On 10 Aug 2017, at 14:57, gerti-cocoa...@bitart.com > wrote: >> >> On Aug 10, 2017, at 02:18, Alastair Houghton >> wrote: >>> >>>

Re: Is "-init" really needed?

2017-08-10 Thread Alastair Houghton
On 10 Aug 2017, at 14:57, gerti-cocoa...@bitart.com wrote: > > On Aug 10, 2017, at 02:18, Alastair Houghton > wrote: >> >> Personally I *would* still discourage +new in favour of class-specific >> convenience constructors because I think it’s less expressive and

Re: Is "-init" really needed?

2017-08-10 Thread gerti-cocoadev
> On Aug 10, 2017, at 02:18, Alastair Houghton > wrote: > > Personally I *would* still discourage +new in favour of class-specific > convenience constructors because I think it’s less expressive and also less > consistent (e.g. +array is better, in my opinion,

Re: Is "-init" really needed?

2017-08-10 Thread Alastair Houghton
On 10 Aug 2017, at 00:28, Doug Hill wrote: > >> - Performance - it incurs an extra message send (which would have been an >> issue back in the day) > > +new requires no extra message. It's just a shorthand for [[SomeClassname > alloc] init] Er, yes it does. It sends a