This is Controller.m in view mode; [Download] [Up]
/* 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 dbmeDemo.dbmodela into your project directory and restart.", NULL, "Notify user that dbmDemo.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:"dbmDemo" connect:YES]) { NXRunAlertPanel(NULL, INSTALL_MODEL, "OK", NULL, NULL); return self; } [theWindow makeKeyAndOrderFront:nil]; return self; } @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.