[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "multiple inheritence" / behavior
From: |
Alexander Malmberg |
Subject: |
Re: "multiple inheritence" / behavior |
Date: |
Fri, 15 Nov 2002 17:52:10 +0100 |
Manuel Guesdon wrote:
>
> 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.
Behaviors sounds very much like what you want. It's dangerous in the
sense that it's easy to mess it up, but when used correctly, there
shouldn't be any problems.
> So, is there another method to make this ? If not, is
> behaviour will be supported for a long time ?
IMO, behaviors is (yet another :) useful and neat feature objective-c
gives us. It is perhaps a bit too advanced for us to plug extensively,
but the header should be installed (or moved to libobjc and installed by
it instead?), although I think the warnings should remain there.
> 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 ?
As long as you don't touch them directly ("self->foo", or plain "foo" in
a method), it should work.
> Thank you .
>
> Manuel
- Alexander Malmberg
- "multiple inheritence" / behavior, Manuel Guesdon, 2002/11/15
- Re: "multiple inheritence" / behavior,
Alexander Malmberg <=
- 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