Re: Keep sibling view in Responder Chain
Re: Keep sibling view in Responder Chain
- Subject: Re: Keep sibling view in Responder Chain
- From: Trygve Inda <email@hidden>
- Date: Sat, 28 Dec 2013 09:48:28 -0800
- Thread-topic: Keep sibling view in Responder Chain
>
> On 27 Dec 2013, at 13:52, Trygve Inda <email@hidden> wrote:
>
>> I have a document with a SourceView on the left side (like iTunes). Some
>> main menu commands pertain to actions in the Source View. This works fine if
>> the SourceView is the active view but my window has other views held in a
>> SplitView.
>>
>> If a sibling of the SourceView is active, the SourceView is not in the
>> responder chain and thus my menu commands are greyed out.
>>
>> How can I keep a sibling view in the responder chain?
>>
>> The alternative is I have to re-create "passthrough" methods in my Document
>> object that pass the real action through to the SourveView since the
>> Document object always is part of the Responder Chain.
>
> That’s what I usually do. Alternately, if I have a view controller for the
> source view, I use setNextResponder: to insert the view controller in the
> responder chain somewhere farther up.
>
> Cheers,
> -- Uli Kusterer
> “The Witnesses of TeachText are everywhere...”
> http://zathras.de
>
>
Can you give an example of how you do that? I guess I'd want it right after
my document controller. Do I need to walk the list looking for my document
controller?
Or just do:
[[document windowController] setNextResponder:sourceViewController]
Trygve
_______________________________________________
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