ftp.nice.ch/peanuts/GeneralData/Documents/user-groups/MWNUG/MWNUG-NewLetterSource-Sept1993.tar.gz#/MWNUG-NewLetterSource-Sept1993/TheDelegate.h

This is TheDelegate.h in view mode; [Download] [Up]

/*-----------------------------------------------------------------------------------------------
   A simple example of browsers and delegation

	 This code is free and in the public domain.  Use it for any purpose you see fit.
	 The editor is set to a width of 130 columns with a tab setting of 2 spaces per tab,
	 so it will look pretty strange unless you modify your tabs accordingly.
	 
	 This is a simple example of delegation.  The browser in the nib file uses
	 this object as a delegate, and calls browser:fillMatrix:inColumn: to fill
	 itself with data.  

	 HISTORY

		27Sep93	DM	Finished off
		14Sep93	DM	Newly created, Don McGregor	

-----------------------------------------------------------------------------------------------*/

#import <appkit/appkit.h>
#import <objc/Storage.h>

@interface TheDelegate:Object
{
	id				theBrowser;													// (NXBrowser*) Hooked up to the browser object in the .nib file
	Storage		*loggedOnNames;											// (Storage*) object that holds the names of everyone logged on
}

	// *** Public methods
	
- refreshHit:sender;														// Refresh button hit


	// *** Delegate methods

- (int)browser																	// RETURN: the number of cells loaded into the browser
		:sender																			// INPUT:  the browser that sent us the message
		fillMatrix:matrix														// INPUT:  the matrix being added to
		inColumn:(int)column;												// INPUT:  which column of the browser is being loaded


	// *** Private methods

-(Storage*)	getNames;														// RETURN:  Storage object that contains the names of everyone logged on

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.