Re: NSView - trouble setting next responder on 10.10 - works okay on 10.9

2015-11-06 Thread Jonathan Mitchell
This thread is a bit long in the tooth but I thought I would conclude it. My final solution to this was not to try and split a separate NSResponder class off from my NSViewController. I could have been gone down this route but the sheer amount of donkey work put me off. The app was designed to wo

'barHideOnSwipeGestureRecognizer' works with two UIScrollViews but not with two others

2015-11-06 Thread David Hoerl
I know this is an esoteric question. I enabled 'hidesBarsOnSwipe' in my MMSpreadSheet view controller. This UIView subclass has 4 UICollectionViews in it - two up top and two below. The top left 'corner' controller does not scroll, and the top right does not scroll vertically. Out of the box

runOnMainQueueWithoutDeadlocking and all its evils.

2015-11-06 Thread Alex Zavatone
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 updating the UI would need to use this type of approach… everywhere. Besides complete ineptitude, is there a rational reason that an

Re: Multiple simultaneous UIAlertControllers

2015-11-06 Thread Alex Zavatone
On Nov 5, 2015, at 6:58 PM, Carl Hoefs wrote: > Thanks for the tip, I'll look into it. > > (As a general thought, though, it would appear that UIAlertController > should be a singleton app-wide, and it should manage its own serialized > presentation. Any other solution seems like external plumbi

Re: 'barHideOnSwipeGestureRecognizer' works with two UIScrollViews but not with two others

2015-11-06 Thread David Duncan
> On Nov 6, 2015, at 8:04 AM, David Hoerl wrote: > > I know this is an esoteric question. > > I enabled 'hidesBarsOnSwipe' in my MMSpreadSheet view controller. This UIView > subclass has 4 UICollectionViews in it - two up top and two below. > > The top left 'corner' controller does not scroll

Re: runOnMainQueueWithoutDeadlocking and all its evils.

2015-11-06 Thread David Duncan
> 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 updating the UI would need to use this type of approach… > everywhere.

Re: -clickedRow

2015-11-06 Thread Raglan T. Tiger
> On Nov 5, 2015, at 1:51 PM, Jens Alfke wrote: > > Convert the position to local coords, then call -rowAtPoint:. I woke up last night and thought exactly that which I have used before ... must be dementia on the rise ! -rags ___ Cocoa-dev maili

Re: -clickedRow

2015-11-06 Thread corbin dunn
> On Nov 5, 2015, at 12:51 PM, Jens Alfke wrote: > > >> On Nov 5, 2015, at 12:35 PM, Raglan T. Tiger wrote: >> >> In -rightMouseDown I call [self clickedRow] which always returns -1 in a row >> or not in row > > Yeah, you’re getting control before the base class has had a chance to set > t

Re: -clickedRow

2015-11-06 Thread Charles Srstka
> On Nov 5, 2015, at 2:35 PM, Raglan T. Tiger wrote: > > I subclass NSTableView to catch -rightMouseDown > > In -rightMouseDown I call [self clickedRow] which always returns -1 in a row > or not in row > > What should I be doing to get the clicked row? If the reason you’re capturing right-c

Re: Multiple simultaneous UIAlertControllers

2015-11-06 Thread Carl Hoefs
On Nov 5, 2015, at 3:53 PM, Eric E Dolecki wrote: > > That's the way. You should never need more than one presented at a time. > > >> On Nov 5, 2015, at 5:44 PM, Tomasz Muszyński wrote: >> >> You should present next UIAlertController when first one has been dismissed >> (when UIAlertAction

Re: Multiple simultaneous UIAlertControllers

2015-11-06 Thread Tomasz Muszyński
> Wiadomość napisana przez Carl Hoefs w dniu > 06.11.2015, o godz. 22:45: > > >> On Nov 6, 2015, at 2:43 PM, Tomasz Muszyński wrote: >> >>> >>> Wiadomość napisana przez Carl Hoefs w dniu >>> 06.11.2015, o godz. 22:39: >>> On Nov 6, 2015, at 2:38 PM, Tomasz Muszyński wrote: >>

Re: Multiple simultaneous UIAlertControllers

2015-11-06 Thread Graham Cox
> On 6 Nov 2015, at 10:58 AM, Carl Hoefs wrote: > > (As a general thought, though, it would appear that UIAlertController > should be a singleton app-wide, and it should manage its own serialized > presentation. Any other solution seems like external plumbing to fix a > design problem.) It is

Trouble w/ key-value binding validation

2015-11-06 Thread Luc Van Bogaert
Hi, In a tableview with a content binding and a value binding on the table cell view textfields to the model's objectValue keypaths, I'm having trouble getting the key-value validation to work correctly. In the model class, I have implemented the required validation methods (validateKey(_ :) th

Sandbox and app (and its parts)

2015-11-06 Thread Juanjo Conti
Hi there! I'm trying to sandbox an app. I've already set the capability and it's working as expected but I have a problem. In the same project that the main app is compiled, we also compile a screensaver (produces a .saver file that the main app installs). This is how it looks: http://pasteboar

Re: Trouble w/ key-value binding validation

2015-11-06 Thread Quincey Morris
On Nov 6, 2015, at 15:23 , Luc Van Bogaert wrote: > > In a tableview with a content binding and a value binding on the table cell > view textfields to the model's objectValue keypaths, I'm having trouble > getting the key-value validation to work correctly. In the model class, I > have impleme

Do playgrounds work at all in 7.1?

2015-11-06 Thread Rick Mann
I'm trying to figure out how to modify a JSON file, and had to check some stuff in a playground. My playground is dirt simple, but seems to do nothing: var model = [ "images" : [ ["thumb" : "url1"], ["thumb" : "url2"] ] print("\(model)") I even tried putting some syntax errors in it; it doesn't

Re: Do playgrounds work at all in 7.1?

2015-11-06 Thread Rick Mann
Ah, syntax error, Xcode doesn't report errors. > On Nov 6, 2015, at 22:08 , Rick Mann wrote: > > I'm trying to figure out how to modify a JSON file, and had to check some > stuff in a playground. My playground is dirt simple, but seems to do nothing: > > var model = [ "images" : [ ["thumb" :

Re: debugging AutoLayout exception with no build errors

2015-11-06 Thread 2551
> On 6 Nov 2015, at 01:31, Conrad Shultz wrote: > You can attach LLDB to a running application (or set it to attach-on-launch) > and set breakpoints therein without needing to actually build. Thanks, that’s something I’ll have to learn how to do down the road… :-) In the meantime, I decided

Modify JSON in Swift

2015-11-06 Thread Rick Mann
I'm trying to do this, but I can't modify the JSON structure. --- import Foundation let s = "{ \"images\" : [ { \"thumb\" : \"url1\", \"width\" : 10 }, { \"thumb\" : \"url2\", \"width\" : 20 } ] }" let data = (s as NSString).dataUsingEncoding(NSUTF8StringEncoding)! do {

Re: Modify JSON in Swift

2015-11-06 Thread Quincey Morris
On Nov 6, 2015, at 22:54 , Rick Mann wrote: > > if var images = json["images"] as? [[String:AnyObject]] No, that won’t work because Swift dictionaries have *value* semantics, so you’re *asking* for a copy here. The same thing in Obj-C works because the variable ‘images’ would be a reference.

Re: Do playgrounds work at all in 7.1?

2015-11-06 Thread Quincey Morris
On Nov 6, 2015, at 22:14 , Rick Mann wrote: > > Ah, syntax error, Xcode doesn't report errors. Incidentally, when I tried it, I got regular compile errors in the playground. However, I have noticed, that sometimes the errors appear in the debug area below the playground, and possibly sometimes