// ConnectorLoader.m
// By Charles G. Fleming, Educational Computing Services, Allegheny College.
// Copyright 1993, Allegheny College.
// You may freely copy, distribute and reuse this code. 
// Allegheny College and the author disclaim any warranty of any kind, 
// expressed or implied, as to its fitness for any particular use.

#import "ConnectorLoader.h"

@implementation ConnectorLoader

- (BOOL)readDataFromStream:(NXStream *)stream
{
	ButtonCell *buttonCell;
	char connectorString[200];
	int rows, cols;

	while(NXScanf(stream, "%s", &connectorString) != EOF)
	{
		[connectorMatrix addRow];
		[connectorMatrix getNumRows:&rows numCols:&cols];
		buttonCell = [connectorMatrix cellAt:rows-1 :0];
		[buttonCell setTitle:connectorString];
	}
	[connectorMatrix sizeToCells];
	[connectorMatrix display];
	return YES;
}	
@end
