[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using collections
From: |
Roger M. Burkhart |
Subject: |
Re: Using collections |
Date: |
Thu, 23 Jan 1997 12:58:12 -0600 |
> I started with just:
>
> if ( (next_goal = [goalIndex next]) != NULL )
> [self setGoal: next_goal];
If you want to reset the index to reprocess any new goals that show up,
another option would be to reposition the index to the Start location:
if ( (next_goal = [goalIndex next]) != NULL ) {
[self setGoal: next_goal];
} else {
[goalIndex setLoc: Start];
}
Then the next call, as long as no new goals show up, will merely hit the
end and reset for processing again, but as soon as a new goal shows up,
it will set that instead.
I agree with Glen that we need more explanation (if not justification) of
rationale for the library interfaces, but especially I think what will be
useful are examples of typical usage and common idioms. Resetting an
index to Start for purposes of reprocessing is one of these. Indexes may
be used to move and position freely anywhere through a collection at any
time, forwards and backwards, at the beginning, end, or anywhere else.
Roger
- Using collections, Ken Cline, 1997/01/15
- Re: Using collections, glen e. p. ropella, 1997/01/17
- Re: Using collections, glen e. p. ropella, 1997/01/17
- Re: Using collections, glen e. p. ropella, 1997/01/23
- Re: Using collections,
Roger M. Burkhart <=
- Re: Using collections, Roger M. Burkhart, 1997/01/27
- Re: Using collections, Kevin Crowston, 1997/01/27
- Re: Using collections, Roger M. Burkhart, 1997/01/28