swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: method inheritance


From: Marshall James
Subject: Re: method inheritance
Date: Wed, 10 Mar 1999 16:24:50 +0100

Sorry,
  that was due to a mistake elswhere in the program. Despite the compiler
warnings about the super class not responding to the message, it's fine at
run-time.
        James

A 15:44 10/03/99 +0100, vous avez écrit :
>Hi,
>  I have some classes, one of which is a super class of the others... in
>the super class I've put the following code
>
>[self dealWithCall: call];
>
>where the dealWithCall method is implemented differently in the different
>sub classes. At first I didn't declare the dealWithCall method in the super
>class, and the compiler complained that it didn't respond to this message,
>and on execution the method was never executed.
>Next I tried declaring the method interface in the .h file of the super
>class. The compiler complained of an incomplete implementation, and again
>the method was never executed.
>Finally I also provided an implementation of the method in the super class,
>with the intention that it would be over-ridden by the implementations in
>the sub-classes, however still the desired method isn't activated.
>Is there any way to do what I'm trying to do? Basically the point of this
>is to have a generic method common to all objects of a certain type, but to
>have this trigger different behaviour in different sub-types of agents.
>Hope someone can point me in the right direction, thanks,
>       James
>--
>
>James Marshall - Research Assistant - COTCOS Project
>  Institut de Recherche en Informatique de Toulouse
>      WWW: http://www.mk.dmu.ac.uk/~jmarshall
>
>                  ==================================
>   Swarm-Support is for discussion of the technical details of the day
>   to day usage of Swarm.  For list administration needs (esp.
>   [un]subscribing), please send a message to <address@hidden>
>   with "help" in the body of the message.
>
>
>
--

James Marshall - Research Assistant - COTCOS Project
  Institut de Recherche en Informatique de Toulouse
      WWW: http://www.mk.dmu.ac.uk/~jmarshall

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]