Subclassing NSControl
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.