swarm-support
[Top][All Lists]
Advanced

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

Makefile/interface question


From: Paul Johnson
Subject: Makefile/interface question
Date: Wed, 21 Jul 1999 15:36:32 -0500

I have 2 classes I want to define in one file, the second class inherits
from the first.  The file is named after the first class, 


ObjectA.h

interface ObjectA: SwarmObject
{
}
@end

interface ObjectB: ObjectB
{
}
@end

ObjectB is adding a few instance variables to ObjectA.

Then instances of objectB are created in another file,say UserClass.m.
The file where the instances are created has 

#import ObjectA.h

When it needs to create a new instance, it uses ObjectB.

The model runs.  However, in the compile there are lots of warning
messages
: warning: cannot find method.
: warning: return type for `getList' defaults to id
: warning: invalid receiver type `void  *'

These are referring to methods defined in ObjectA, but are available to
ObjectB through inheritance.  As far as I can tell, at runtime it
figures out where to get those methods.  But I want to understand how to
make the compiler stop warning me.

I think there is something I need to do to the Makefile to let it know
that ObjectB lives in the file ObjectA, but I've not figured out what
that should be.  Currently, in the makefile I declare ObjectA.o, but
every time I try to declare ObjectB.o, I get the error that the file
ObjectB.h does not exist.

-- 
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700

                  ==================================
   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]