swarm-support
[Top][All Lists]
Advanced

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

Name Space conflicts and Swarm?


From: Paul Johnson
Subject: Name Space conflicts and Swarm?
Date: Wed, 02 Jun 1999 17:06:50 -0500

I've had two conflicts that I think are related to the name space, but
I'm not sure of terminology. What do you think?

Question 1.  This one came up today and I was truly surprised!

I had a method
-manage: thing Offer: anOffer;

All was well.

Then I created a new class called "Offer" and tried to use it in the
class that had manage:Offer.
All hell broke loose, error messages at compile time appeared in
manage:Offer saying that "anOffer" was undefined.
I solved by renaming the new class.  

Is it common knowledge that the name of a class could not appear in the
name of a method?

Question 2.

In the newly renamed class "OfferClass" I put in a method 

-getStatus

At compile time, it says there are multiple definitions of getStatus,
and from the messages it was apparent that the code would use the
getStatus from the swarm libraries, not mine. 

I've noticed this behavior in Swarm-1.4.1, and possibly in Swarm-1.4.
(its a blur to me now).  I've run into it with methods like
"getPosition" and "getCount" as well.  I've fixed this by just renaming
my methods so they don't have the same names as methods in the swarm
library.  

But I don't understand why it happens.  If on the inheritance tree there
is a class with a method getStatus, my new method ought to override it. 
If there's a method by that name in another class, why does the problem
arise at all?  

Oh, well, just wondering.

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