swarm-support
[Top][All Lists]
Advanced

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

Re: [Swarm-Support] why there is no answer?


From: Paul Johnson
Subject: Re: [Swarm-Support] why there is no answer?
Date: Mon, 24 Jan 2005 11:01:25 -0600
User-agent: Mozilla Thunderbird 0.9 (X11/20041127)

I didn't see a question before, but I generally ignore the ones that start out with "I'm using Microsoft Windows to ...". Sorry.

From your code snip, we cannot tell what type "relationList" is. If it is declared as

id <List> relationList;

and if you declare the relationIndex as

id <ListIndex> relationIndex;

then all should be well.

Please remember. When you tell the compiler something is "id" then it literally does not know anything about it. So include the prototype and it will help.

I THINK !

HU Xiaojun wrote:
Hi,

I have a question.I posted it several days before, but got no answer.
I am wondering why.
I hope some one could give me a help.
I want to remove an object from a list and insert another object at the same
postion.

the code is:

- function
{
....
id  relationIndex;
id element;
id newelement=nil;
relationIndex = [relationList begin: [self getZone]];
for(element = [relationIndex next]; [relationIndex getLoc] == Member; element =
[relationIndex next])
{
     if(....)
{ [relationIndex remove];
newelement=....
         [relationIndex addAfter: newelement];
} }
[relationIndex drop];
return self;
}

When I compile it, it complains that method "addAfter" not implemented by
protocol.
so I made some change,I decalre the relationIndex as:

id  relationIndex;
and keep the other things.

when i compile it, it complains that in the line of "relationIndex = [relationList begin: [self getZone]];" objects does not comform
to the "listindex" protocol.

Could somebody give me some advice?
The version is swarm-2.1.1.

Thanks!

xiaojun


_______________________________________________
Support mailing list
address@hidden
http://www.swarm.org/mailman/listinfo/support


--
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66044-3177           FAX: (785) 864-5700


reply via email to

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