ftp.nice.ch/Attic/openStep/developer/resources/MiscKit.2.0.5.s.gnutar.gz#/MiscKit2/Temp/MiscAutoTextScroller/Controller.m

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

/* Controller.m created by stark on Fri 04-Apr-1997 */

#import "Controller.h"
#import "MiscAutoTextScroller.h"

@implementation Controller

- (void)startScroll:sender
{	[itsTextScroller startScroll:self];
}

- (void)stopScroll:sender
{	[itsTextScroller stopScroll:self];
}

- (void)chooseFile:sender
{	id theOpenPanel = [[NSOpenPanel openPanel] retain];
	if ([theOpenPanel runModalForTypes:[NSArray arrayWithObjects:@"rtf", @"rtfd", nil]]==NSOKButton)
		if (![itsTextScroller setTextFromRTFDPath:[theOpenPanel filename]])
			NSBeep();
	[theOpenPanel release];
}

- (void)takeAnimRateFrom:sender
{	[itsTextScroller setFrameCountPerSecond:[sender floatValue]];
//	NSLog( @"fps:%f time/100:%f", (double)[itsTextScroller frameCountPerSecond], [itsTextScroller scrollTime] );
}

- (void)takeSpeedFrom:sender
{	[itsTextScroller setScrollTime:[sender floatValue]];
//	NSLog( @"fps:%f time/100:%f", (double)[itsTextScroller frameCountPerSecond], [itsTextScroller scrollTime] );
}

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{	[itsSpeedSlider setFloatValue:[itsTextScroller scrollTime]];
	[itsAnimRateSlider setFloatValue:[itsTextScroller frameCountPerSecond]];
}

@end

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