Re: Properties: A question of style

2016-06-15 Thread Michael Starke
If I've though longer about my answer I would have seen that you only talk about read-only properties, I could have saved the comment. It's only useful for readwrite properties, because only then the asymmetric getter/setter situations can occur. > >> >> Hi all, >> >> Just a quick point for

Re: UINavigationController back gesture animation

2016-06-15 Thread Torsten Curdt
Since I am getting nowhere with this I thought maybe at least I could know when the animation finishes. So I was trying it like this: extension UINavigationController { func pushViewController(viewController: UIViewController, animated: Bool, completion: (Void -> Void)) { pushViewContr

Re: UINavigationController back gesture animation

2016-06-15 Thread David Duncan
Most pushes end up deferred (they don’t happen until the run loop turns) so the transition coordinator would not have been created yet. Try using the UINavigationController delegate methods, -navigationController:willShow/didShowViewController:animated:, instead. > On Jun 15, 2016, at 7:57 AM,

Re: Properties: A question of style

2016-06-15 Thread Jens Alfke
> On Jun 14, 2016, at 4:48 PM, Graham Cox wrote: > > @property (readonly) BOOL isFoo; > > or: > > @property (readonly, getter=isFoo) BOOL foo; Are you asking whether it’s better to name a boolean property “foo” or “isFoo”? Or are you asking about the naming of the getter method for a no

Re: Properties: A question of style

2016-06-15 Thread Charles Srstka
> On Jun 14, 2016, at 8:42 PM, Steve Mills wrote: > >> On Jun 14, 2016, at 19:45, Charles Srstka > > wrote: >> >> if thisArray.empty { doSomething() } > > That's not what he suggested as the 2nd form. Look again. > > Steve via iPad Except that it is. The prope

Re: Properties: A question of style

2016-06-15 Thread Graham Cox
> On 16 Jun 2016, at 3:45 AM, Jens Alfke wrote: > > >> On Jun 14, 2016, at 4:48 PM, Graham Cox wrote: >> >> @property (readonly) BOOL isFoo; >> >> or: >> >> @property (readonly, getter=isFoo) BOOL foo; > > Are you asking whether it’s better to name a boolean property “foo” or > “isFo

Re: Properties: A question of style

2016-06-15 Thread dangerwillrobinsondanger
Watch the Ali Ozer video from the other day at wwdc. He covers this very topic. Sent from my iPhone > On Jun 16, 2016, at 8:34 AM, Graham Cox wrote: > > >> On 16 Jun 2016, at 3:45 AM, Jens Alfke wrote: >> >> >>> On Jun 14, 2016, at 4:48 PM, Graham Cox wrote: >>> >>> @property (readonly)

Re: Properties: A question of style

2016-06-15 Thread Quincey Morris
On Jun 15, 2016, at 16:34 , Graham Cox wrote: > > If the property is ‘isFoo’, then in every situation (such as KVO, or using > dot syntax) I would be using the keypath “isFoo”, and that’s fine, but it’s > inconsistent with other properties that are not readonly, where the > underlying property

Re: Properties: A question of style

2016-06-15 Thread Jeff Szuhay
Tuesday? Any close approximation of the title of his talk would be helpful. > On Jun 15, 2016, at 4:47 PM, dangerwillrobinsondan...@gmail.com wrote: > > Watch the Ali Ozer video from the other day at wwdc. > He covers this very topic. ___ Cocoa-dev

Re: Properties: A question of style

2016-06-15 Thread dangerwillrobinsondanger
"What's New in Cocoa" Sent from my iPhone > On Jun 16, 2016, at 9:49 AM, Jeff Szuhay wrote: > > Tuesday? > Any close approximation of the title of his talk would be helpful. > >> On Jun 15, 2016, at 4:47 PM, dangerwillrobinsondan...@gmail.com wrote: >> >> Watch the Ali Ozer video from the ot

Selected value binding in popups

2016-06-15 Thread Rick Mann
I have a popup menu that's bound to an NSArrayController of AVCaptureDevice objects. These objects have a "localizedName" property that I use for the content values, and the content and content objects point to the NSArrayController. I also have a property on my view controller used for the sel

Can initialKey & initialValue be set via bindings?

2016-06-15 Thread John Chacho
(warning:I may not be asking the right question) Here's what I have: A simple app with a NSTableview, 2 buttons, 2 fields, a controller, and a dictionary controller. The dictionary Controller content is bound to the NSDictionary instance property in the App Controller. The app Controller just in