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

Subclassing NSControl


  • Subject: Subclassing NSControl
  • From: Lorenzo <email@hidden>
  • Date: Wed, 14 May 2003 09:51:40 +0200

Hi,
I have two own subclasses:
MYTextField subclass of NSTextField
MYImageView subclass of NSImageView

For many of their behaviours these 2 classes work the same way,
e.g. they respond to the mouse clicks the same way,
if the user clicks holding down the Control key, a pop-up menu appears...

So I thought to group these 2 subclasses under a superClass "MYBox",
and to describe the common behaviours (like mouseDown, mouseUp)
in this new superClass "MYBox".

Since both NSTextField and NSImageView are subclasses of NSControl,
I subclassed the new superclass "MYBox" from NSControl too.

But now, I don't know how I should subclass the 2 classes.
I presume I am on the half of the way.

How should I subclass the 2 classes?
Any idea about?


Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
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: Subclassing NSControl
      • From: Scott Anguish <email@hidden>
  • Prev by Date: Re: [OT] iTunes 4 blows
  • Next by Date: Re: Subclassing NSControl
  • Previous by thread: Using NSRulerView without paper
  • Next by thread: Re: Subclassing NSControl
  • Index(es):
    • Date
    • Thread