Storing

Richard A. O'Keefe ok at atlas.otago.ac.nz
Sun Dec 2 23:19:17 UTC 2001


"James Stark" <james_stark03 at hotmail.com> wrote:
	I have a record subclass declared as follows:
	
	Object subclass: #RECORD - I have various methods for this.
	
Why all caps?

	I want to make an array of records - so its one array that stores of type 
	records - which I have defined
	
So
    a := OrderedCollection new.
    a add: "something that makes a RECORD".
    a add: "something that makes a RECORD".
    ...

	I have tried the following:
	
	OrderedCollection subclass: #People
	
If you want an extensible array that can hold instances of RECORD,
just use an OrderedCollection.  It can hold instances of any class.
You don't have to have a different type of array for each different
type of element.





More information about the Squeak-dev mailing list