Instance Method

objectAtLocation:

Returns the object at the given location in the receiver.

Declaration

- (ObjectType)objectAtLocation:(id)location;

Parameters

loc

An object that specifies the absolute position of the object within the array. It can be an integer index, a list of coordinates, a URL, or other determinant. See the discussion for clarification.

Return Value

A reference to the SBObject object identified by loc or nil if the object couldn’t be located.

Discussion

This method is a generalization of objectAtIndex: for applications where the "index" is not simply an integer. For example, Finder can specify objects using a NSURL object as a location. In OSA this is known as "absolute position," a generalization of the notion of “index” in Foundation—it could be an integer, but it doesn't have to be. A single object may even have a number of different "absolute position" values depending on the container.

See Also

Getting Objects in the Array

- objectWithName:

Returns the object in the array with the given name.

- objectWithID:

Returns the object in the array with the given identifier.