2ndalpha / gasmask

Hosts file manager for OS X
3.73k stars 252 forks source link

Crash on Start (0.8.2) #73

Closed pbausch closed 9 years ago

pbausch commented 9 years ago

I just updated to Gas Mask 0.8.2 and it crashes when it starts. I'm on OSX 10.9.5. The diagnostic report in Console says: "Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSStatusItem button]: unrecognized selector sent to instance 0x10a63f1f0'"

Hope this helps--thanks for the excellent tool.

trevershick commented 9 years ago

Sorry you had an issue. I'll start looking into this.

2ndalpha commented 9 years ago

I pulled the update and testing it on older versions of OSX at the moment.

trevershick commented 9 years ago

I don't have Mavericks on any of my machines. I'm trying to figure out how to get it running on a VM.

2ndalpha commented 9 years ago

[NSStatusItem button] was added to Yosemite: https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSStatusItem_Class/index.html#//apple_ref/occ/instp/NSStatusItem/button

There are probably two solutions:

trevershick commented 9 years ago

I think NSStatusItem/button is the 'preferred' way now so I think a conditional on the version is probably the best.

I'm not sure how this would work with the xib (i've not done it before) but i'm sure i can just conditionally show it or hide it. Possibly enable/disable.

I'm not sure if there's an "Apple" way to do this though.