File:  [NeXTSTEP 3.3 examples] / Examples / DatabaseKit / OracleDemo / Controller.m
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:49:00 2018 UTC (8 years, 1 month ago) by root
Branches: NeXT, MAIN
CVS tags: NeXTSTEP33, HEAD
Sample Programs from NeXSTEP 3.3

/* Controller.m:
 * 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.
 *
 * Written by Mai Nguyen, NeXT Developer Support
 *
 */

#import "Controller.h"
#import	<dbkit/dbkit.h>
#import <libc.h>

/* Define localized strings */
#define INSTALL_MODEL NXLocalizedString("Please install OracleDemo.dbmodela into your project directory and restart.", NULL, "Notify user that OracleDemo.dbmodela must be installed in his project directory.")

@implementation Controller

/* Extract the actual database and recordlist from the DBModule UI Object
 */ 
-appDidInit:sender
{
		/* Notify the user if the database can't be found */
	if (![DBDatabase findDatabaseNamed:"OracleDemo" connect:YES]) {
		NXRunAlertPanel(NULL, INSTALL_MODEL, "OK", NULL, NULL);
		return self;
	}	
  		
	[theWindow makeKeyAndOrderFront:nil];
	return self;
}

@end


unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.