ftp.nice.ch/pub/next/audio/apps/Patchmix.NIHS.bs.tar.gz#/Patchmix/Source/ImageController.m

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

// Controller.m
// By Jayson Adams, NeXT Developer Support Team
// You may freely copy, distribute and reuse the code in this example.
// NeXT disclaims any warranty of any kind, expressed or implied, as to its
// fitness for any particular use.
// Modified by Mara Helmuth for Patchmix.

#import <appkit/NXImage.h>
#import <appkit/Application.h>

#import "PatchView.h"
#import "PaletteView.h"

#import "ImageController.h"


@implementation ImageController


/* delegate methods */

- appDidInit:sender
{
	const char thePath[200];
	const char sPath[200];
	
	sprintf(thePath,"%s/NewInst",NXHomeDirectory());      // default path: $HOME/NewInst
	[instPath setStringValue:thePath];
	[scorePath setStringValue:thePath];
	sprintf(sPath,"%s/sf",NXHomeDirectory());      // default sound path: $HOME/sf
	[sndPath setStringValue:sPath];
    
    /* stick images in the palette window for the user to drag */
    [paletteView setImages];
	
	// initiate patchview images
	[patchVw setImages];
    
    /* bring all the windows on screen */
    [[patchVw window] makeKeyAndOrderFront:NULL];				// ACCEPT VIEW
    [[paletteView window] makeKeyAndOrderFront:NULL];
    
    return self;
}

- acceptedWindow:acceptView fromSource:source
{
    [[acceptView window] makeKeyAndOrderFront:NULL];
    return self;
}

@end

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