Re: Need Help with Swift

2015-12-06 Thread Stevo Brock
So, as it turns out, when I went to start “cleaning things up”, things started to get ugly again. In the end, given some other small design changes and the crazy amounts of time this was sucking up, I ended up just ripping it all out and going with straight-up classes and just subclassing and d

Re: How to

2015-12-06 Thread Graham Cox
> On 7 Dec 2015, at 2:45 AM, Dave wrote: > > On the Mac what is the best control to use to do this? Just override -mouseDown: in the view and call [NSApp sendAction:toTarget:from:] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: ARC and IBOutlet - strong vs weak......

2015-12-06 Thread Britt Durbrow
Your reference is weak, old man… oh, wait, that’s kung-fu…. um…. Seriously - I always make my references strong unless I have a good reason not to (avoiding retain cycles is one such good reason). Weak references, while nice for what they do, do have some overhead and other drawbacks (like the

Re: How to create an empty stack view in code

2015-12-06 Thread Dave
Hi, I’m not sure what to use for the Frame though? The way this is setup is that I have a Stack View an empty Stack View in a NIB, as so: @property (nonatomic,strong)IBOutlet NSStackView* pLabelMainRowStackView; //Vertical There is a then a Row Array which contains Column Arrays and each

Re: How to create an empty stack view in code

2015-12-06 Thread Jonathan Hull
You can just do [[NSStackView alloc] initwithFrame:] > On Dec 6, 2015, at 6:23 AM, Dave wrote: > > Hi All, > > How do I create an Empty Stack View in code? The only method I can find that > that creates a Stack View is stackViewWithViews and you can’t pass nil to > this. Do I have to pass an

How to

2015-12-06 Thread Dave
Hi All, I have a view that is made up for a Text View and a Small Icon like so: NSView NSImageView NSTextField If the User Clicks anywhere inside the base NSView, I’d like an Perform Click IBAction to be sent to the connected class (The Window Controller in this case). In the p

Re: ARC and IBOutlet - strong vs weak......

2015-12-06 Thread Dave
> On 5 Dec 2015, at 17:31, Alex Zavatone wrote: > > Weak. > > There is only one reference to it, right? > It seems that the actual answer is “it depends”……. But making them strong unless you specifically need to do otherwise seems like the best practise approach….. Dave ___

Re: ARC and IBOutlet - strong vs weak......

2015-12-06 Thread Gerd Knops
"weak" is also inherently incompatible with KVO, because no notification is sent when the weak reference goes away. And that'll wreak havoc, especially when you are using Cocoa Bindings. Gerd > On Dec 6, 2015, at 05:52, Dave wrote: > >> >> On 4 Dec 2015, at 18:04, Quincey Morris >> wrote:

How to create an empty stack view in code

2015-12-06 Thread Dave
Hi All, How do I create an Empty Stack View in code? The only method I can find that that creates a Stack View is stackViewWithViews and you can’t pass nil to this. Do I have to pass an empty array or can I just do [[NSStackView alloc] init]; ? All the Best Dave __

Re: UIView underlying rects for drawRect

2015-12-06 Thread Roland King
> On 6 Dec 2015, at 20:18, Roland King wrote: > > >> >> CALayer has a mechanism built in for the sort of thing you want to do. Read >> up on -[CALayer display]. You should be able to override that, or implement >> the corresponding delegate method in your UIView and perform management of >>

Re: UIView underlying rects for drawRect

2015-12-06 Thread Roland King
> > CALayer has a mechanism built in for the sort of thing you want to do. Read > up on -[CALayer display]. You should be able to override that, or implement > the corresponding delegate method in your UIView and perform management of > your custom bitmap there. I myself do this in one app to

Sheet segue from menu in OS X?

2015-12-06 Thread Rick Mann
Is it possible to have a sheet segue from a menu that's triggered on the current NSDocument subclass? Or do I have to do it old school with a message sent to first responder? My document can have more than one window. TIA, -- Rick Mann rm...@latencyzero.com

Re: ARC and IBOutlet - strong vs weak......

2015-12-06 Thread Dave
> On 4 Dec 2015, at 18:04, Quincey Morris > wrote: > > On Dec 4, 2015, at 06:16 , Dave > wrote: >> >> I asked about this on Twitter to an engineer on the IB team and he confirmed >> that strong should be the default and that the developer docs are being >> up

Re: UIView underlying rects for drawRect

2015-12-06 Thread Mike Abdullah
> On 6 Dec 2015, at 01:50, Roland King wrote: > > You thought CGContext had it, I thought CALayer had it, neither of them > appear to have it! > > AFAICT UIView is clearing the entire rectangle before drawing, so that idea > doesn’t work either. That was a good way to confirm I was on the wr