• 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: Cocoa classes question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa classes question


  • Subject: Re: Cocoa classes question
  • From: Daniel DeCovnick <email@hidden>
  • Date: Thu, 7 Jul 2005 22:35:54 -0700

I could be wrong, but I think it sounds like your only mistake is in not just having MyOtherClass inherit from NSObject, ie:

@interface MyOtherClass : NSObject
...

@interface MyClass : MyClass
...

-Daniel DeCovnick
danhd123 at mac dot com
Softyards Software
http://www.softyards.com

On Jul 5, 2005, at 11:25 AM, Luc Vandal wrote:

I have some code I want to reuse in different objects so I thought I could write a class that other classes would derive from. I guess I'll simply create an instance of that class in the objects that will need it.

Luc


On 5-Jul-05, at 2:17 PM, Will Mason wrote:


Objective-C does not support multiple inheritance, but you can achieve
similar results by using protocols and/or categories. What are you
trying to do?


Will

--- Luc Vandal <email@hidden> wrote:


Hi,

what is the syntax so a class can derrive from more than one class? I

tried

@interface MyClass: NSObject, MyOtherClass

and I get a compile error.

Thanks!

Luc



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:


40yahoo.com


This email sent to email@hidden




_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Cocoa classes question
      • From: Daniel DeCovnick <email@hidden>
References: 
 >Re: Cocoa classes question (From: Will Mason <email@hidden>)
 >Re: Cocoa classes question (From: Luc Vandal <email@hidden>)

  • Prev by Date: Re: "Guided tour" of sample app (was Re: Smart Group Question)
  • Next by Date: Re: Cocoa classes question
  • Previous by thread: Re: Cocoa classes question
  • Next by thread: Re: Cocoa classes question
  • Index(es):
    • Date
    • Thread