• 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: Subclassing NSControl
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subclassing NSControl


  • Subject: Re: Subclassing NSControl
  • From: Pierre-Loïc Raynaud <email@hidden>
  • Date: Mon, 14 Apr 2003 11:45:55 +0200

On mardi, jan 21, 2003, at 23:25 Europe/Paris, Mark Levin <email@hidden> wrote:

I have placed an instance of a subclass of NSControl in a window in IB
(using a custom view with the custom class selected), and connected the
target and action, which appears to work normally and doesn't throw any
nib errors when loaded. However, when the control attempts to send this
action, it's disappeared ([self action] returns nil). What am I doing
wrong?

--Mark


If you wrote a NSControl subclass without using cells, and you want to use target/actions, you just have to link your Control with a NSActionCell by adding in your NSControl subclass implementation:

+ (Class) cellClass
{
return [NSActionCell class];
}
_______________________________________________
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.

  • Prev by Date: Re: Flag images?
  • Next by Date: BSD sockets and Cocoa
  • Previous by thread: Re: Automating PB builds?
  • Next by thread: BSD sockets and Cocoa
  • Index(es):
    • Date
    • Thread