[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: "multiple inheritence" / behavior
From: |
Mondragon, Ian |
Subject: |
RE: "multiple inheritence" / behavior |
Date: |
Fri, 15 Nov 2002 10:15:39 -0600 |
use a @protocol - that's exactly what they're for. if you want all of your
classes to respond to everyoneDoThis and everyoneDoThat...
--- SecretMethods.h ---
@protocol
- (void)everyoneDoThis;
- (void)everyoneDoThat;
@end
--- end ---
then in each of your non-related classes, just declare them like so:
--- WhateverClass.h ---
@interface WhateverClass <SecretMethods>
--- end ---
then implement the methods.
problem solved. another hoo-rah for objc.
- ian mondragon
> -----Original Message-----
> From: Manuel Guesdon [SMTP:ml@orange-concept.com]
> Sent: Friday, November 15, 2002 9:30 AM
> To: discuss-gnustep@gnu.org
> Subject: "multiple inheritence" / behavior
>
> MIME-Version: 1.0
> Content-Type: text/plain; charset="us-ascii"
> Content-Disposition: INLINE
> Organization: Orange Concept
> X-Mailer: Mahogany 0.64 'Sparc', compiled for Linux 2.4.3-12smp i686
> Reply-To: ml@orange-concept.com
>
> Hi,
>
> I'dl like to have a common set of methods used by different objects but
> without letting them inherit from the same class
> and without adding a category to one of the common inherited class.
> I've seen behavior methods which seems to be what I need but there are
> warnings in behavior.h.
> So, is there another method to make this ? If not, is behaviour will be
> supported for a long time ? Is there any
> problem if I add methods by this way in classes which don't have exactly
> the same ivars (or ivars order) if I don't use
> these ivars directly ?
>
> Thank you .
>
> Manuel
>
>
>
>
> _______________________________________________
> Discuss-gnustep mailing list
> Discuss-gnustep@gnu.org
> http://mail.gnu.org/mailman/listinfo/discuss-gnustep
- Re[2]: "multiple inheritence" / behavior, (continued)
- Re[2]: "multiple inheritence" / behavior, Manuel Guesdon, 2002/11/15
- Re: "multiple inheritence" / behavior, David Ayers, 2002/11/18
- Re: "multiple inheritence" / behavior, Richard Frith-Macdonald, 2002/11/18
- Re: "multiple inheritence" / behavior, Alexander Malmberg, 2002/11/18
- Re: "multiple inheritence" / behavior, David Ayers, 2002/11/18
- Re: "multiple inheritence" / behavior, Philip Mötteli, 2002/11/18
- Re: "multiple inheritence" / behavior, Alexander Malmberg, 2002/11/18
- Re: "multiple inheritence" / behavior, Nicola Pero, 2002/11/25
- Re[2]: "multiple inheritence" / behavior, Manuel Guesdon, 2002/11/18
- Re: Re[2]: "multiple inheritence" / behavior, Richard Frith-Macdonald, 2002/11/18
- RE: "multiple inheritence" / behavior,
Mondragon, Ian <=
- RE: "multiple inheritence" / behavior, Mondragon, Ian, 2002/11/15
- RE: "multiple inheritence" / behavior, Mondragon, Ian, 2002/11/15