[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with NSelect
From: |
SCHREIBER,DARREN MATTHEW |
Subject: |
Problem with NSelect |
Date: |
Mon, 27 Sep 1999 10:58:13 -0700 (PDT) |
I am using Swarm-1.3.1 in Windows 95 (I just got my Swarm2.0.1 CD-ROM and
haven't attempted the installation yet). I am using NSelect in the
following code:
-step {
id bestLocation;
id newLocation;
id <List> emptySpacesList;
id <List> optionsList; // Will hold a list of possible places to live.
int i, s;
int listLength;
float bestUtility;
id <NSelect> selector;
selector=[NSelect create: [self getZone]];
optionsList=[List create: [self getZone]];
[selector select: 5 from: emptySpacesList into: optionsList];
I get the following compiler error:
Person.m: In function `_i_Person__step':
Person.m:82: warning: method `select:from:into:' not implemented by
protocol.
Which I think is strange since that is the only method I see in NSelect.
But, I am guessing that this might be because NSelect does not use a
protocol statement (if that's the case I don't understand why).
Regardless, I can get rid of the error by removing the <NSelect> command
in the id statement.
When I run however, I am getting a segmentation fault at the line where I
use the NSelect method. EmptySpacesList should not (despite its name) be
empty since it is filled with emptySpaces at the buildObjects phase. I
tried using a printf of the getCount, but I don't get any output before
the segmentation fault.
Anyway, what can I do to make NSelect work?
Darren
==================================
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.
RE: Intall on Red Hat Linux, Jares, Timothy, 1999/09/28