swarm-support
[Top][All Lists]
Advanced

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

inheritance and problems with #include statements


From: Joseph & Kathleen Villa
Subject: inheritance and problems with #include statements
Date: Wed, 05 Jan 2000 01:02:41 -0800

Greetings, all!

I've recently been enjoying picking up enough skills to get functional models running - thanks to everyone!

In the course of things, I've started to try to use inheritance to manage the complexity of my models. When I find similarities amongst classes that I had not anticipated, I create a new superclass and consolidate methods and variables.

In particular, I usually 1) create the new superclass, 2) modify my @interface Subclass: Superclass statements in my newly subordinated classes, 3) promote #import "Class.h" statements to my new superclass (when needed by the methods I plan to promote), and 4) promote methods.

From time to time, however, I run into the following problem. When I promote #import "Class.h" statements to my new superclass, I sometimes get the following error (or some flavor thereof). The snippet below occurs when I try to put #import "Person.h" in EmployedRole.h.

Is it obvious to anyone what would cause this? I can provide more detail if appropriate, but thought I'd throw this out to see if there's something really dumb I'm doing. In the meantime, I just bumble onward - suffering redundancies in my subclasses.

Thanks!

Joseph.

==============================================================================

address@hidden/Swarm-2.0.1/cassian/system] $ make
gcc -c -g -O2 -Wall -Wno-import -Wno-protocol -Werror -DAPPNAME=cassian -DAPPV
ERSION=2.0  -DDLL -I/Swarm-2.0.1/include EmployedRole.m
In file included from HRCoordinator.h:2,
                 from CompanyWidget.h:3,
                 from ModelSwarm.h:5,
                 from God.h:4,
                 from JobPostings.h:1,
                 from JobSeeker.h:3,
                 from Person.h:3,
                 from Role.h:5,
                 from EmployedRole.h:1,
                 from EmployedRole.m:3:
Employee.h:15: Cannot find interface declaration for `EmployedRole', superclass
of `Employee'
make: *** [EmployedRole.o] Error 1
address@hidden/Swarm-2.0.1/cassian/system] $


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