Re: Trouble with imported enums in Swift

2014-10-20 Thread Rick Mann
Sigh, I figured it out. Not only do you have to use NS_ENUM, the enumeration members MUST begin with the name of the enumeration. > On Oct 20, 2014, at 19:43 , Roland King wrote: > > >> On 21 Oct 2014, at 10:23 am, Rick Mann wrote: >> >> >>> On Oct 20, 2014, at 19:17 , Roland King wrote: >

Re: Trouble with imported enums in Swift

2014-10-20 Thread Roland King
> On 21 Oct 2014, at 10:23 am, Rick Mann wrote: > > >> On Oct 20, 2014, at 19:17 , Roland King wrote: >> >> well one is ‘==‘ and the other is ‘=‘ so not totally shocked there’s no >> error in the second one. > > Well, okay, but == sure is getting confused, but = sees the two types as > co

Re: Trouble with imported enums in Swift

2014-10-20 Thread Rick Mann
> On Oct 20, 2014, at 19:17 , Roland King wrote: > > well one is ‘==‘ and the other is ‘=‘ so not totally shocked there’s no error > in the second one. Well, okay, but == sure is getting confused, but = sees the two types as compatible. > Have you tried > > 1) a switch Type 'McpSweepState

Re: Trouble with imported enums in Swift

2014-10-20 Thread Roland King
> On 21 Oct 2014, at 10:03 am, Rick Mann wrote: > > I'm having weird trouble using a C enumeration imported via bridging header > from swift. I can define an instance variable and initialize it using the > enum, but I can't compare the enum: > > Camera.swift:60:18: Cannot invoke '==' with an

Trouble with imported enums in Swift

2014-10-20 Thread Rick Mann
I'm having weird trouble using a C enumeration imported via bridging header from swift. I can define an instance variable and initialize it using the enum, but I can't compare the enum: Camera.swift:60:18: Cannot invoke '==' with an argument list of type '(@lvalue McpSweepState, McpSweepState)'

Re: Custom NSTableRowView Question

2014-10-20 Thread Uli Kusterer
On 20 Oct 2014, at 12:08, Luther Baker wrote: > I tried setting it in the init'r but it is getting overwritten. I can > intercept the calls to [NSTableRowView setBackgroundColor:] and override > the color but before doing that, I'd like to better understand why the > color is being set by somethin

Menubar not always redrawing in 10.10

2014-10-20 Thread Mills, Steve
We're seeing a weird problem in 10.10. Inserting or removing items from the main menubar will often not cause the menubar to redraw. Clicking in the menubar or typing a key equiv used in a menu item will cause it to redraw. I've done quite a bit of dinking around to try to figure out if it's som

Re: NSBezierPath with Transparent color stroke

2014-10-20 Thread Gordon Apple
Reminds me when I racked my brain trying to figure out how OmniGraffle drew parallel border lines on Beziers. I tried inset/outset, etc, then slapped my forehead when I realized that they just stroked it with a wide line, then again with a narrow line using the background color. Duh! On 10/20/14

Re: NSBezierPath with Transparent color stroke

2014-10-20 Thread Quincey Morris
On Oct 20, 2014, at 06:50 , Leonardo wrote: > > I really need to fill the rect with flat red and stroke it with a 10 > points-width 50% transparent gray border. What does that mean? Are you trying to fill the entire rect with red, and wrap a 10-point stroke around it (i.e. completely outside t

Custom NSTableRowView Question

2014-10-20 Thread Luther Baker
I've created and I'm displaying a custom NSTableRowView but I'm having trouble settings its background color. I tried setting it in the init'r but it is getting overwritten. I can intercept the calls to [NSTableRowView setBackgroundColor:] and override the color but before doing that, I'd like to

Re: NSBezierPath with Transparent color stroke

2014-10-20 Thread Ken Thomases
On Oct 20, 2014, at 8:50 AM, Leonardo wrote: > I fill my bezierPath (a simple rect) with a red color. > Then I stroke it with a 10 point border with a 50% transparent gray color. > Since the border of the path gets drawn 50% inside the path and 50% outside > the path, I end up with an external 5

NSBezierPath with Transparent color stroke

2014-10-20 Thread Leonardo
I fill my bezierPath (a simple rect) with a red color. Then I stroke it with a 10 point border with a 50% transparent gray color. Since the border of the path gets drawn 50% inside the path and 50% outside the path, I end up with an external 5 points 50% gray border and an internal 5 points red-gra

Can't get first try of NSURLProtocol subclass to work.

2014-10-20 Thread Daryle Walker
I entered a URL that triggers my handler, but I get this from the Xcode debug log: > 2014-10-20 07:42:08.968 MyApp[94134:303] *** Assertion failure in -[NSWindow > setTitle:], /SourceCache/AppKit/AppKit-1265.21/AppKit.subproj/NSWindow.m:2901 > 2014-10-20 07:42:08.972 MyApp[94134:303] *** WebKit