• 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
Merging a an Objective-C class with other classes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Merging a an Objective-C class with other classes


  • Subject: Merging a an Objective-C class with other classes
  • From: Mark Alldritt <email@hidden>
  • Date: Tue, 23 Jan 2007 09:27:15 -0800
  • Thread-topic: Merging a an Objective-C class with other classes

Hi All,

I have a number of view classes.  Each inherits from a different NSView
class (i.e. NSView, NSOutlineView, etc.).  I what to share a common
implementation of cut:, copy:, paste: and other methods across all these
classes.

An Objective-C Category on NSView does not seem appropriate because I don't
want to replace the implementation of cut:, copy:, paste:, etc. on *all*
NSView instances in my application.

In C++ I would use a mix-in class through multiple inheritance.  Can someone
point me point me to the right way to approach this problem in Objective-C?

Thanks
-Mark

------------------------------------------------------------------------
Mark Alldritt                      Late Night Software Ltd.
Phone: 250-380-1725                Script Debugger 4.0 - AppleScript IDE
WEB:  http://www.latenightsw.com/  FaceSpan 4.3 - AppleScript RAD
                                   Affrus 1.0 - Perl Debugging


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Merging a an Objective-C class with other classes
      • From: glenn andreas <email@hidden>
    • Re: Merging a an Objective-C class with other classes
      • From: "Stephen Deken" <email@hidden>
  • Prev by Date: Re: Best way to read a file from HTTP URL
  • Next by Date: Re: Merging a an Objective-C class with other classes
  • Previous by thread: [JOB] Senior Cocoa Coder at The Omni Group
  • Next by thread: Re: Merging a an Objective-C class with other classes
  • Index(es):
    • Date
    • Thread