ftp.nice.ch/pub/next/connectivity/news/NGService.1.1.NIHS.bs.tar.gz#/NGService/Source/MMFolderCell.m

This is MMFolderCell.m in view mode; [Download] [Up]

/*
 *      You may freely copy, distribute and reuse the code
 *      in this example.  Scott Anguish disclaims any warranty of
 *      any kind, expressed or implied, as to its fitness
 *      for any particular use.
 *		Please keep this notice intact
 *      Written by: Scott Anguish  sanguish@digifix.com
 */

#import "MMFolderCell.h"

#import <libc.h>					  /* MAXPATHLEN */
#import <stdio.h>
#import <strings.h>

#import <appkit/appkit.h>

#import <streams/streams.h>


@implementation MMFolderCell:MMCell

- imageFromFilename:(const char *)filename
{
	if (!theImage)
			{
			theImage=[[Application workspace] getIconForFile:filename];
			if (!theImage){ 
					theImage = [[NXImage alloc] initFromFile: "/usr/lib/nib/folder_nib.tiff" ];
					}
			}	return self;

}	

- imageFromAttachment
{

	char filename[MAXPATHLEN+1];

	sprintf(filename,"/tmp/%s",attachmentName);
	[self imageFromFilename:filename];
	return self;
}


@end

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