Re: Another AppleScript-ObjC Bridge Question

2015-11-09 Thread Dave
Hi, Got it working now, tt seems you don’t need the “_” after the name for init? Are the rules for when you need a “_” or not documented anywhere? All the Best Dave ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Another AppleScript-ObjC Bridge Question

2015-11-09 Thread Dave
I’m trying to override init_ in using an AppleScript-ObjC Class, here is my code: on init_() continue init_() display dialog "HELLO WORLD" testOutlookAgain_("Hello") of me -- Add your subclass-specific initialization here. -- If an error occurs here, return

NSSegmentedControl's sizing behaviour

2015-11-09 Thread Graham Cox
I’m struggling to get the behaviour I want from NSSegmentedControl. I want each segment to have the same width, which is the overall width of the control divided into equal parts. When the overall control is resized, the segment sizes should change, but remain equal to each other and fill the

Re: NSSegmentedControl's sizing behaviour

2015-11-09 Thread Ken Thomases
On Nov 9, 2015, at 9:36 PM, Graham Cox wrote: > > I’m struggling to get the behaviour I want from NSSegmentedControl. > > I want each segment to have the same width, which is the overall width of the > control divided into equal parts. When the overall control is

SOLVED: Fade when changing window's rootViewController possible?

2015-11-09 Thread Diederik Meijer
This has probably changed then in iOS 8 or 9. It used to be splitViewControllers MUST be root and could not be presented modally, see third paragraph on this page:

Instancetype and refactoring methods

2015-11-09 Thread Alex Zavatone
I'm enjoying the risks of refactoring some poorly named methods in Xcode 7.1 and the refactorer is mentioning "Ambiguous Type: Message sent to id." for methods sent to a delegate. Before I give it a shot, is this a case where using instancetype to return the instance of the object that holds

Re: Fade when changing window's rootViewController possible?

2015-11-09 Thread David Duncan
> On Nov 7, 2015, at 11:31 PM, Diederik Meijer wrote: > > Thank you David, > > I forgot to mention that one of them is a UISplitViewController and - unless > this has changed - that one can not be presented modally. I’m not aware of any particular reason why a split

Re: Instancetype and refactoring methods

2015-11-09 Thread Alex Zavatone
Thanks. It appears that the instancetype didn't help, as I had already converted the init method to return the instancetype instead of id. Yeah, oddly enough, the object that's conforming to the protocol is using delegate/protocol and calling a method in the delegate - which isn't even

Re: Instancetype and refactoring methods

2015-11-09 Thread Jens Alfke
> On Nov 9, 2015, at 10:58 AM, Alex Zavatone wrote: > > Before I give it a shot, is this a case where using instancetype to return > the instance of the object that holds the method a better choice than id? It sounds like your delegate API is using the old “informal protocol”

Re: runOnMainQueueWithoutDeadlocking and all its evils.

2015-11-09 Thread Alex Zavatone
On Nov 7, 2015, at 5:20 PM, Mike Abdullah wrote: > In my experience, the main issue is on OS X. If you ever display a modal > window, that runs the run loop in a special mode for the duration of the > window. The trouble is, that mode does not include dequeuing things from > GCD’s main queue,

Re: runOnMainQueueWithoutDeadlocking and all its evils.

2015-11-09 Thread Alex Zavatone
On Nov 6, 2015, at 1:23 PM, David Duncan wrote: > >> On Nov 6, 2015, at 8:36 AM, Alex Zavatone wrote: >> >> Bearing in mind my experience dealing with code in the past that was chock >> full of runOnMainQueueWithoutDeadlocking calls, I can not fathom why someone >> who was not

Re: Another AppleScript-ObjC Bridge Question

2015-11-09 Thread Shane Stanley
On 10 Nov 2015, at 1:47 AM, Dave wrote: > > Got it working now, tt seems you don’t need the “_” after the name for init? > > Are the rules for when you need a “_” or not documented anywhere? You don't need -- and in fact cannot use -- an underscore anywhere. The