This is MiscListCursorPositioning.rtf in view mode; [Download] [Up]
Version 1.0, Copyright ©1994 by Doug McClure. All Rights Reserved. MiscListCursorPositioning Adopted By: MiscList Declared In: MiscProtocols.h Protocol Description The MiscListCursorPositioning protocol is a set of calls for a List class for moving through. These methods let you set a cursor which keeps track of the current positiong in a List class. The rest of the methods allow a program to move forward, backward, and to determine the current position. This protocol is designed for loop constructs. Method Types Setting the position - setFirstObject - setLastObject - setNextObject - setPreviousObject - setTo: Querying the position - currentPosition Instance Methods currentPosition - (unsigned int)currentPosition Returns the index of the record to which the cursor is currently pointing. setFirstObject - setFirstObject Sets the cursor to point to the first record in the container and returns that record. Returns nil if the container holds no records. setLastObject - setLastObject Sets the cursor to point to the last record in the container and returns that record. Returns nil if the container holds no records. setNextObject - setNextObject Sets the cursor to point to the next record in the container and returns that record. Returns nil and doesn't move the cursor if it's currently pointing to the last record. setPreviousObject - setPreviousObject Sets the cursor to point to the previous record in the container and returns that record. Returns nil and doesn't move the cursor if it's currently pointing to the first record. setTo: - setTo:(unsigned int)index Sets the cursor to point to the index'th record in the container and returns that record. Returns nil and doesn't move the cursor if index is out of bounds.
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.