• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cut, Copy, & Paste Question.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cut, Copy, & Paste Question.


  • Subject: Re: Cut, Copy, & Paste Question.
  • From: Michael Babin <email@hidden>
  • Date: Sun, 5 Mar 2006 14:44:19 -0600


On Mar 5, 2006, at 12:45 PM, Ian was here wrote:

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?

Look at the Sketch example (/Developer/Examples/AppKit/Sketch). Look at the main menu in Draw2.nib. See how these menu items are still connected to the First Responder? Now look at SKTGraphicView.m, which contains cut, copy, and paste methods. Finally, look at SKTDrawWindowController.m, particularly its windowDidLoad method. See how the view is made the first responder of the window? This makes the view part of the responder chain when the window is the application's main window.


For more details on the responder chain, see the link Malcolm referred to in an earlier reply:
<http://developer.apple.com/documentation/Cocoa/Conceptual/ BasicEventHandling/Concepts/AboutRespChain.html>


--
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 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


References: 
 >Re: Cut, Copy, & Paste Question. (From: Ian was here <email@hidden>)

  • Prev by Date: Re: QTMovie weird behavior
  • Next by Date: Re: problem with subclassing a cluster class
  • Previous by thread: Re: Cut, Copy, & Paste Question.
  • Next by thread: NSMovie jpg question
  • Index(es):
    • Date
    • Thread