ftp.nice.ch/pub/next/games/fun/Fortune.s.tar.gz#/Fortune/FortuneMaker.m

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

/* Generated by Interface Builder */

#import "FortuneMaker.h"
#import <appkit/appkit.h>
#import "fortune.h"

@implementation FortuneMaker

- setViewer:anObject
{
    viewer = anObject;
    return self;
}


- pickFortune:sender
{
     int i;
     long random();
     long randomNumber;
    
         randomNumber = random();
    
     i = abs(randomNumber % NUM);     
     [viewer setStringValue:fortunes[i]];
     

    return self;
}


@end

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