Re: Cut, Copy, & Paste Question.
Re: Cut, Copy, & Paste Question.
- Subject: Re: Cut, Copy, & Paste Question.
- From: Greg Herlihy <email@hidden>
- Date: Sun, 05 Mar 2006 11:23:37 -0800
- Thread-topic: Cut, Copy, & Paste Question.
By adding
- (void)cut:(id)sender;
- (void)copy:(id)sender;
- (void)paste:(id)sender;
methods to whichever on duty responder you think should handle them.
Greg
On 3/5/06 10:45 AM, "Ian was here" <email@hidden> wrote:
> The Cut, Copy, and Paste menu items are connected to
> their corresponding actions in a view class.
>
>
>> Generally speaking, the correct approach is to leave
>> these menu items
>> connected to the First Responder and make sure that
>> you implement the
>> corresponding methods on the appropriate object in
>> the responder chain.
>
>
> This general idea was my first thought, but searching
> through the documentation didn't seem to yield any
> real world examples. If I do reconnect the Cut, Copy,
> and Paste menu items back to the First Responder; how
> could I get those events in my view class?
>
>
>
> --- Michael Babin <email@hidden> wrote:
>
>> On Mar 1, 2006, at 6:11 PM, Ian was here wrote:
>>
>>> I have a drawing application which allows the user
>> to
>>> create ovals, rectangles, and text objects. I
>>> implemented Cut, Copy, and Paste of these objects.
>> I
>>> did so by connecting the Cut, Copy, and Paste menu
>>> items to my class and adding the following
>> methods:
>>
>> You connected these menu items to what class? A
>> document? A view?
>>
>>> The problem that I am having is that when a text
>>> object is in focus (text can be edited within a
>> text
>>> view), the Cut, Copy, and Paste no longer
>> function. It
>>> did function when the Cut, Copy, and Paste menu
>> items
>>> were connected to the Nib file's First Responder.
>>>
>>> The question I have is how can I redirect the Cut,
>>> Copy, and Paste menu items when the text object
>> comes
>>> into focus.
>>
>> Generally speaking, the correct approach is to leave
>> these menu items
>> connected to the First Responder and make sure that
>> you implement the
>> corresponding methods on the appropriate object in
>> the responder chain.
>>
>> --
>> Michael Babin
>> email@hidden
>> Order N Development, LLC
>> http://www.orderndev.com/
>> Goldfish Aquarium for Mac:
>> http://www.lifeglobe.com/product/
>> index.php?pltid=2&ref=OrderNDev
>>
>>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden