Re: NSView - trouble setting next responder on 10.10 - works okay on 10.9
Re: NSView - trouble setting next responder on 10.10 - works okay on 10.9
- Subject: Re: NSView - trouble setting next responder on 10.10 - works okay on 10.9
- From: Jonathan Mitchell <email@hidden>
- Date: Sun, 04 Oct 2015 11:02:28 +0100
> On 3 Oct 2015, at 18:43, Quincey Morris <email@hidden> wrote:
>
>
> I suggest you consider breaking your view controllers apart into two objects. One, a “view responder” would be a NSResponder subclass that you insert into the responder chain just below the window controller. The other, an actual NSViewController subclass, would be inserted into the responder chain wherever the frameworks want, or possibly not at all pre-10.10.
That’s a good idea!
>
> Ideally, all of the business logic would be moved from its current home in the view controller to the view responder, including the action messages. All that’d be left in the view controller would be the outlets (if any), and the viewDidLoad logic necessary to prepare the view itself (and also to create the view responder, and insert it in the responder chain). Alternatively, you could keep all the local-to-view logic in the view controller, and put only the trans-view logic in the view responder, but this may get a bit messy if both share the same custom data structures.
The business logic is all in a separate framework.
The view controllers simply hookup the UI bindings by calling into the BL.
So I might go along the lines of of an additional lightweight NSResponder that acts an action receiver that routes actions back to proxies in the view controller.
Or, it might be simpler to just accept the 10.10 design changes and refactor accordingly.
In the long term this might be best in terms of reducing overall complexity.
Thanks a bunch for you input. It helped a lot.
J
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden