Re: Cocoa-dev Digest, Vol 13, Issue 14

2016-01-11 Thread John Brownie
On 12/01/2016 14:08, Eden Smallwood wrote: On 11/01/2016 18:44, Motti Shneor wrote: You want the Even Better Authorization Sample Code rather than SMJobBless. John I don't think he does. The E. B. A. S. C. relies on AEWP, which is utterly, hopelessly, unspeakably deprecated.

Re: Cocoa-dev Digest, Vol 13, Issue 14

2016-01-11 Thread Eden Smallwood
> On 11/01/2016 18:44, Motti Shneor wrote: > You want the Even Better Authorization Sample Code rather than SMJobBless. > > John I don't think he does. The E. B. A. S. C. relies on AEWP, which is utterly, hopelessly, unspeakably deprecated. He does in fact want to use

Re: Panes vs. Separate Windows

2016-01-11 Thread Greg Weston
> (I also don’t want to restart Xcode wars, but I do actually believe that the > unified window style that arrived in Xcode 4 was an actual decision about > which worked best, made by clever people who actually thought about it. It > wasn’t — I believe — merely clueless. I also want to point out

Re: Confusion around tint color and UIImage rendering mode

2016-01-11 Thread Rick Mann
> On Jan 11, 2016, at 17:24 , David Duncan wrote: > > >> On Jan 11, 2016, at 3:53 PM, Rick Mann wrote: >> >> I have a UIButton subclass that does a lot of complex state changing, either >> replacing its image or drawing progress into itself. The images look like >> typical iOS 7+ icons, lit

Re: Confusion around tint color and UIImage rendering mode

2016-01-11 Thread David Duncan
> On Jan 11, 2016, at 3:53 PM, Rick Mann wrote: > > I have a UIButton subclass that does a lot of complex state changing, either > replacing its image or drawing progress into itself. The images look like > typical iOS 7+ icons, little blue outlines of things. > > This worked well in the regu

Re: Using CFHash to tell if a CFTypeRef has changed?

2016-01-11 Thread Jens Alfke
> On Jan 11, 2016, at 10:18 AM, Dave wrote: > > Any one have any other techniques for telling if a CFTypeRef has changed? No, in general there is no way. You’d have to make a copy of the object, keep that around, and then later call CFEqual on the current object and the copy … except that (a)

Confusion around tint color and UIImage rendering mode

2016-01-11 Thread Rick Mann
I have a UIButton subclass that does a lot of complex state changing, either replacing its image or drawing progress into itself. The images look like typical iOS 7+ icons, little blue outlines of things. This worked well in the regular view hierarchy, but now I need to add one to at UINavigati

Re: Panes vs. Separate Windows

2016-01-11 Thread Charles Srstka
My favorite thing in Xcode is the way that Interface Builder stuffs the entire object library into that tiny little space in the lower-right corner of the screen. Way back in Xcode 3 (or whenever it was that IB was a separate app), the floating palette that they had for the object library let yo

Re: Panes vs. Separate Windows

2016-01-11 Thread Marco S Hyman
> My reasoning is that if you make it inflexible, you risk getting (say) 50% > lovers and 50% haters. If you make it flexible, you risk getting 40% lovers > and 40% haters, and 20% people who are annoyed because it’s too flexible or > too complicated. That’s a net loss in satisfaction. I think

Re: Panes vs. Separate Windows

2016-01-11 Thread Matt Reagan
> If you make it flexible, you risk getting 40% lovers and 40% haters, and 20% > people who are annoyed because it’s too flexible or too complicated. That’s a > net loss in satisfaction. How about: 40% lovers, 40% haters, and 20% people who *are initially frustrated by the complexity, and then

Re: Panes vs. Separate Windows

2016-01-11 Thread Quincey Morris
On Jan 11, 2016, at 13:06 , Lee Ann Rucker wrote: > > no system is going to make everyone happy, so go for the most flexible one if > you can I’d like to advocate the opposite point of view: no system is going to make everyone happy, so go for the the one that works best. (Yes, I understand w

Re: Panes vs. Separate Windows

2016-01-11 Thread Lee Ann Rucker
> On Jan 11, 2016, at 7:35 AM, Jim Lee wrote: > > We have an application, TopXNotes that allows multiple “documents” (notes) to > be opened in adjacent views (panes). The notes can be edited individually. > One can cut/paste/copy from any text document to/from a seperate text app, or > from p

Re: Panes vs. Separate Windows

2016-01-11 Thread Carl Hoefs
FWIW, I find it odd that so many apps these days seem to be following Xcode's "lead", if you want to call it that. I still miss Xcode 3.2.6 because I could configure it for the way *I* was most productive. Now you gotta use that ginormous "plate" window. It shows you what it wants to show you wh

Re: Using CFHash to tell if a CFTypeRef has changed?

2016-01-11 Thread Wim Lewis
On Jan 11, 2016, at 10:18 AM, Dave wrote: > It’s actually an NSInteger so it’s 64 bits isn’t it? But I take your point, > the hash isn’t going to change. > > Any one have any other techniques for telling if a CFTypeRef has changed? Does CFEqual() do what you need? It depends a lot on what you

Re: Panes vs. Separate Windows

2016-01-11 Thread Gary L. Wade
I've seen an advantage to having "attached palettes" like Xcode's Utilities pane. When set up like this, I can see unique attributes per window and compare two separate documents. When there's only one shared all over the place, it might be harder at times to get context at a glance. An example

Re: Using CFHash to tell if a CFTypeRef has changed?

2016-01-11 Thread Gary L. Wade
It depends on what the actual object is. CFTypeRef is the (void*) or (id) equivalent for CoreFoundation types, so if you know what it is, check its documentation for notifications or KVO options. If it's an immutable object (like a CFStringRef,NSString), the object's data will never change. -- G

Re: Panes vs. Separate Windows

2016-01-11 Thread Rick Mann
I'm pleased to see so many in favor of multiple windows. It seems the arguments in favor of a single monolithic window hinge smaller screens. But I find that monolithic windows require larger screens (and can't share screens). The thing about separate windows is they can overlap and still be use

Re: Using CFHash to tell if a CFTypeRef has changed?

2016-01-11 Thread Dave
Hi, It’s actually an NSInteger so it’s 64 bits isn’t it? But I take your point, the hash isn’t going to change. Any one have any other techniques for telling if a CFTypeRef has changed? All the Best Dave > On 11 Jan 2016, at 18:08, Jens Alfke wrote: > > >> On Jan 11, 2016, at 9:57 AM, Jens

Re: Using CFHash to tell if a CFTypeRef has changed?

2016-01-11 Thread Jens Alfke
> On Jan 11, 2016, at 9:57 AM, Jens Alfke wrote: > > No. If the object has changed, its hash isn’t guaranteed to change; there > exist hash collisions where two different values have the same hash. (This is > inevitable since there are only 2^32 hash values, but a nearly infinite > number of

Re: Using CFHash to tell if a CFTypeRef has changed?

2016-01-11 Thread Jens Alfke
> On Jan 11, 2016, at 9:48 AM, Dave wrote: > > I have an object that is a wrapper around a CFTypeRef. I’d like to be able to > check if this object has changed, can I use the safely use the CFHash() > function to do this. No. If the object has changed, its hash isn’t guaranteed to change; th

Using CFHash to tell if a CFTypeRef has changed?

2016-01-11 Thread Dave
Hi, I have an object that is a wrapper around a CFTypeRef. I’d like to be able to check if this object has changed, can I use the safely use the CFHash() function to do this. e.g. When the Wrapper Object is created, do a CFHash() on the reference and store it as a property of the wrapper clas

Re: enum as String

2016-01-11 Thread Eric E. Dolecki
Thanks for your reply. I’ve decided to change the enum as String to a simple enum and change the evaluation based on that enum - based on your reply. Since my method argument is typed to that enum, I can use shortcuts and no need for .rawValue. It’s all good now and is developer-friendly. Eric O

Re: Nullability Question

2016-01-11 Thread Seth Willits
On Jan 11, 2016, at 8:04 AM, Dave wrote: > I’ve noticed there are two forms to specify nullability on properties, is one > preferred syntax over the other? Judging by Apple's usage, using the property attributes (nullable and nonnull) are preferred. -- Seth Willits _

Re: enum as String

2016-01-11 Thread Jens Alfke
> On Jan 11, 2016, at 7:37 AM, Eric E. Dolecki wrote: > > 1. How can I get rid of that .rawValue? It works but not coder-friendly. In Swift one usually uses a switch statement to match enums, rather than comparing rawValues. (There are a lot of examples in the book.) —Jens _

Re: enum as String

2016-01-11 Thread Alex Zavatone
I've got a few things set up in Objective-C for getting a string value from an enum but I'm sure it's different in Swift. I can send the Objective-C ones if you think they would be helpful. On Jan 11, 2016, at 10:37 AM, Eric E. Dolecki wrote: > I have the following enum > > *enum SomeMode: St

Re: Panes vs. Separate Windows

2016-01-11 Thread Alex Zavatone
Way back in the mid '90s, there was some double click tool that simply felt like the holy grail to me. You double clicked or option clicked on the title of a window and it would turn that window into the "floating windoid" title bar only. We took this model and made it so that when you collaps

Re: Panes vs. Separate Windows

2016-01-11 Thread Alex Zavatone
On Jan 11, 2016, at 2:17 AM, Britt Durbrow wrote: > My preference would be multiple windows (one primary document window and > several utility panel windows) that can be snapped into place against each > other. This gives the freedom to use multiple monitors while also having the > screen-real

Nullability Question

2016-01-11 Thread Dave
Hi, I’ve noticed there are two forms to specify nullability on properties, is one preferred syntax over the other? @property (nonatomic,copy) NSString* _Nullable propA; @property(readonly,nullable) NSString* propB; Thanks Dave __

Re: Subclassing/Override question

2016-01-11 Thread Dave
Thanks Jens and Peter, got it now. All the Best Dave ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubs

enum as String

2016-01-11 Thread Eric E. Dolecki
I have the following enum *enum SomeMode: String {* *case ComputeRequired* *case Calculating* *case Normal* *case ComputeUnavailable* *}* Works great if access like so: *SomeMode.Calculating.rawValue* 1. How can I get rid of that .rawValue? It works but not coder-friendly.

Re: Panes vs. Separate Windows

2016-01-11 Thread Jim Lee
We have an application, TopXNotes that allows multiple “documents” (notes) to be opened in adjacent views (panes). The notes can be edited individually. One can cut/paste/copy from any text document to/from a seperate text app, or from pane to pane. Just one example of something different that I

Re: Panes vs. Separate Windows

2016-01-11 Thread Dave
> On 9 Jan 2016, at 22:19, Rick Mann wrote: > > In complex apps (e.g. CAD apps, IDEs) a given document has many auxiliary > windows. The trend in UI at Apple has been to consolidate these into panes in > a single window. I've always preferred separate windows (e.g. separate > toolbar window).

Re: Panes vs. Separate Windows

2016-01-11 Thread Charles Jenkins
Interesting that so many others like the multiwindow approach. I’ve always thought that a horrible design, because you constantly have to fool with them to get them out of the way as you work on a document. I like the approach taken by Photoshop, where you can dock them them together in the layo

Re: Why doesn't SMJobBless sample work?

2016-01-11 Thread Motti Shneor
OK. My bad. The Readme had it all, and I missed it. My unconscious Classic-Mac programmer seems to filter out python scripts still… Thanks, it works now. > On 11 בינו׳ 2016, at 10:44, Motti Shneor wrote: > > Hi. Excuse this novice question (I see previous questions relating to > SMJobBless tha

Re: Why doesn't SMJobBless sample work?

2016-01-11 Thread John Brownie
On 11/01/2016 18:44, Motti Shneor wrote: Hi. Excuse this novice question (I see previous questions relating to SMJobBless that start off where I need to finish…) I need to develop an OS-X daemon (in c++) that must run privileged. I intend to deploy it embedded in a System-Preferences panel, th

Why doesn't SMJobBless sample work?

2016-01-11 Thread Motti Shneor
Hi. Excuse this novice question (I see previous questions relating to SMJobBless that start off where I need to finish…) I need to develop an OS-X daemon (in c++) that must run privileged. I intend to deploy it embedded in a System-Preferences panel, that will launch it using the SMJobBless() A