[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Swarm-Support] Re: trouble with index
From: |
emcleskey |
Subject: |
[Swarm-Support] Re: trouble with index |
Date: |
Fri, 7 May 2004 23:07:52 -0600 |
Scott,
Thanks for your reply. To answer your questions: The return type for
-getXPos and -getYPos is float. Here's how I wrote -getXPos (-getYPos is
written the same except sub Y for X):
- (float) getXPos{
return xPos;
}
I'm not sure I know what you mean when you ask 'what class is element'. The
code from the swarm user guide that I used to create my code is this:
id <Index> pplIndex = nil;
id element = nil;
int numberOfFriends;
pplIndex = [pplPresent begin: [self getZone]];
while ((element = [pplIndex next]) != nil)
{
numberOfFriends = [element getNumFriends];
if (numberOfFriends > 3)
[popularPeople addLast: element];
}
[index drop];
- [Swarm-Support] Re: trouble with index,
emcleskey <=