• 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: [newbie] access the controller for the current window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [newbie] access the controller for the current window


  • Subject: Re: [newbie] access the controller for the current window
  • From: Barry McClure <email@hidden>
  • Date: Wed, 17 Aug 2005 16:25:59 -0700 (PDT)

Thank you, that did it. I used the NSApp delegate to
obtain a pointer to the controller.

I appreciate the assistance.
Barry

--- Nick Zitzmann <email@hidden> wrote:

>
> On Aug 17, 2005, at 4:40 PM, Barry McClure wrote:
>
> > I subclassed NSTableView to capture keydown
> events.
> > The method that i want fired when a certain key is
> > pressed is in the controller class for
> application. It
> > doesn't fire the method.
> >
> > someController (in the following code) is nil.
> What
> > have I done wrong?
>
> You are calling the method that returns the window's
> window
> controller. Unless you specifically created the
> window using a
> subclass of NSWindowController, then the result
> you're seeing isn't
> too surprising. Is your application controller the
> delegate of
> NSApplication? If so, then you can call [NSApp
> delegate] to get a
> pointer to the application controller.
>
> Nick Zitzmann
> <http://www.chronosnet.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

References: 
 >Re: [newbie] access the controller for the current window (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: [newbie] access the controller for the current window
  • Next by Date: Re: Should I set Core Data dependent key in the primary's setter?
  • Previous by thread: Re: [newbie] access the controller for the current window
  • Next by thread: Table Cell Editing
  • Index(es):
    • Date
    • Thread