Re: title bar hit test?

2014-06-14 Thread Uli Kusterer
On 15 Jun 2014, at 00:46, Cosmin Apreutesei wrote: > How can I hit-test the title bar rectangle without the resizing > corners and edges? There’s no official API to do this that I’m aware of. > (I need this so I can implement synchronous window moving events). Can I ask why you’re trying to d

Re: NSOutlineView floating group row question

2014-06-14 Thread Lee Ann Rucker
When IB creates a SourceList style outline view in your nib, it sets the color to 49% gray instead of controlTextColor. They may look the same in a SourceList, but only controlTextColor will work correctly when selected. So I wouldn't depend on IB providing the correct defaults, and that might b

title bar hit test?

2014-06-14 Thread Cosmin Apreutesei
Hi, How can I hit-test the title bar rectangle without the resizing corners and edges? (I need this so I can implement synchronous window moving events). Thanks. PS: Empirically, the edges are 3px wide on OSX 10.9 and the corners are 4px, but I'd rather not hardcode these. _

Re: NSOutlineView floating group row question

2014-06-14 Thread Bill Cheeseman
On Jun 14, 2014, at 5:02 PM, Lee Ann Rucker wrote: > Actually, the "default" color you get from IB may not be the "proper" color: > rdar://16040037 > > View-based SourceList header cell default text color should not be a custom > > It's 49% gray, instead of a named system color. One effect of

Re: NSOutlineView floating group row question

2014-06-14 Thread Lee Ann Rucker
Actually, the "default" color you get from IB may not be the "proper" color: rdar://16040037 View-based SourceList header cell default text color should not be a custom It's 49% gray, instead of a named system color. One effect of that is that it's an unreadable gray on blue when selected. It a

Re: Implicitly unwrapped optionals

2014-06-14 Thread Quincey Morris
On Jun 14, 2014, at 13:09 , Ken Thomases wrote: > For convenience. Specifically, IIUC, the point is that NSDate? and NSDate are different, incompatible types. The convenience comes from not having to “cast” NSDate? to NSDate by using the “!” operation in expressions. On Jun 14, 2014, at 12:45

Re: NSOutlineView floating group row question

2014-06-14 Thread Bill Cheeseman
On Jun 14, 2014, at 3:28 PM, Quincey Morris wrote: > It might be simplest to try deleting your source outline view, and adding a > normal one, then reconfiguring as a source list manually. Actually, I've been through every single setting in the Source List library object in the nib file a d

Re: Implicitly unwrapped optionals

2014-06-14 Thread Ken Thomases
On Jun 14, 2014, at 2:45 PM, Roland King wrote: > I'm watching the Swift Interoperability In Depth talk and that basically says > that all object types in ObjC look like implicitly unwrapped optionals in > swift. Ie NSDate* date turns up as > > var date : NSDate! > > First question is why use

Re: Implicitly unwrapped optionals

2014-06-14 Thread SevenBits
On Jun 14, 2014, at 3:45 PM, Roland King wrote: > I'm a little confused about implicitly unwrapped optionals. > > My current understanding is that you can access their value directly, without > using the 'if let' syntax or the explicit unwrap (!) operator, but you'll > crash if the optional d

Re: Implicitly unwrapped optionals

2014-06-14 Thread Vincent
> Le 14 juin 2014 à 21:45, Roland King a écrit : > > My current understanding is that you can access their value directly, without > using the 'if let' syntax or the explicit unwrap (!) operator, but you'll > crash if the optional doesn't have a value when you do. You can also treat > them li

Implicitly unwrapped optionals

2014-06-14 Thread Roland King
I'm a little confused about implicitly unwrapped optionals. My current understanding is that you can access their value directly, without using the 'if let' syntax or the explicit unwrap (!) operator, but you'll crash if the optional doesn't have a value when you do. You can also treat them lik

Re: NSOutlineView floating group row question

2014-06-14 Thread Ken Thomases
On Jun 14, 2014, at 1:03 PM, Bill Cheeseman wrote: > I have a view-based NSOutlineView with the Floats Group Rows setting turned > on in Interface Builder. The outline view is the one supplied by the Source > List object in the Xcode 5.1.1 Interface Builder library. It has Highlight > set to th

Re: NSOutlineView floating group row question

2014-06-14 Thread Quincey Morris
On Jun 14, 2014, at 11:03 , Bill Cheeseman wrote: > I must be overlooking something in those examples. I have a vague recollection of once trying to use the IB source list item and running into something that seemed oddly configured. It might be simplest to try deleting your source outline vie

Any examples of -[NSScrollView addFloatingSubview:]?

2014-06-14 Thread Bill Cheeseman
The -[NSScrollView addFloatingSubview:] method was added in OS X 10.9 Mavericks. I can't find any usage examples, and the Mavericks release notes and the reference document are not helpful to me. Playing around with it for a few minutes has gotten me nowhere. Has anybody figured out how to use

Re: NSOutlineView floating group row question

2014-06-14 Thread Bill Cheeseman
On Jun 14, 2014, at 2:52 PM, Kyle Sluder wrote: > Do you override -viewWillDraw anywhere? That is the method NSTableView uses > to push down style attributes to its row views and their cells, so don’t > forget to call super. > > Also, what color have you assigned to your text fields? If it’s

Re: NSOutlineView floating group row question

2014-06-14 Thread Kyle Sluder
On Jun 14, 2014, at 11:03 AM, Bill Cheeseman wrote: > > Can anybody explain the trick to me? I must be overlooking something in those > examples. Do you override -viewWillDraw anywhere? That is the method NSTableView uses to push down style attributes to its row views and their cells, so don’t

NSOutlineView floating group row question

2014-06-14 Thread Bill Cheeseman
I have a view-based NSOutlineView with the Floats Group Rows setting turned on in Interface Builder. The outline view is the one supplied by the Source List object in the Xcode 5.1.1 Interface Builder library. It has Highlight set to the Source List style, and it includes two NSTableCellViews, o