This is tarZanMain.m in view mode; [Download] [Up]
/* Generated by Interface Builder */
// Created By James T. Romano July 22, 1992
// Member of the Dynamic Duo of NeXT Computers!
//
//
// Read it and Weep!
#import "tarZanMain.h"
#import "tarZanObject.h"
#import "deCompObject.h"
#import <string.h>
#import <appkit/Application.h>
#import <appkit/Cell.h>
#import <appkit/Matrix.h>
#import <appkit/Menu.h>
@implementation tarZanMain
- procedure:sender
{
Cell *cell = [sender selectedCell];
switch([cell tag]) {
case 1: [[tarZanObject allocFromZone:[self zone]] init];
break;
default:
printf("UNKNOWN\n");
break;
}
return self;
}
// Delegate Methods
- (BOOL)appAcceptsAnotherFile:sender
{
return YES;
}
- (int)app:sender openFile:(const char *)filename type:(const char *)aType
{
if (strcmp(aType,"tar") == 0)
[[tarZanObject allocFromZone:[self zone]] initUsingFile:filename withType:1];
else
if (strcmp(aType,"Z") == 0) {
if (strstr(filename,".tar.Z"))
[[tarZanObject allocFromZone:[self zone]] initUsingFile:filename withType:3];
else
[[deComp allocFromZone:[self zone]] deCompressFile:filename];
}
else {
NXRunAlertPanel("ERROR OCCURED!","File type not valid.","OK",NULL,NULL);
return NO;
}
return YES;
}
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.