• 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: Using NSView as a template
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using NSView as a template


  • Subject: Re: Using NSView as a template
  • From: Matt Ball <email@hidden>
  • Date: Sun, 7 Mar 2004 21:34:16 -0500

On Mar 7, 2004, at 9:17 PM, Allan Odgaard wrote:

On 8. Mar 2004, at 3:09, Matt Ball wrote:

You have not showed enough code for me to verify that this is the case, and I cannot make sense about the above, sounds like you confuse the "responder chain" concept with something else.

Since the setTitle: does work, I would think that the setAction: also work, but that it is the responder chain which is your problem.
This is my entire BookmarksController.m file:
[...]
Not sure if that helps at all in diagnosing the problem. I'm pretty new at this, and don't really have much of the lingo down. (I've got the concepts, just don't know what to call them)

I do not see how this class should end up in the responder chain. You can explicitly set the target for the action message on the button, but it might be difficult in your case because of the way you archive/unarchive the view to make a copy (a pointer to a target might get lost in that process).

Do you instantiate your bookmarksController in the Nib file? if so, set it up as either the window or application delegate, that should ensure it a place in the responder chain, and so the action message should reach your object.

Please read the programming topics of NSResponder for more info about the responder chain and action messages.



Yes, I have instantiated it in Interface Builder. I can't set it as the window delegate, however, because that is already set to MyDocument, which is the main class for that window.

-- Matt Ball
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Using NSView as a template
      • From: Ryan Bates <email@hidden>
References: 
 >Using NSView as a template (From: Matt Ball <email@hidden>)
 >Re: Using NSView as a template (From: Allan Odgaard <email@hidden>)
 >Re: Using NSView as a template (From: Matt Ball <email@hidden>)
 >Re: Using NSView as a template (From: Allan Odgaard <email@hidden>)
 >Re: Using NSView as a template (From: Matt Ball <email@hidden>)
 >Re: Using NSView as a template (From: Allan Odgaard <email@hidden>)

  • Prev by Date: Re: Using NSView as a template
  • Next by Date: My WebPolicyDelegate always returns false for actionInformation test
  • Previous by thread: Re: Using NSView as a template
  • Next by thread: Re: Using NSView as a template
  • Index(es):
    • Date
    • Thread