|
|
1.1 root 1: /* Controller.m:
2: * You may freely copy, distribute, and reuse the code in this example.
3: * NeXT disclaims any warranty of any kind, expressed or implied, as to its
4: * fitness for any particular use.
5: *
6: * Written by Mai Nguyen, NeXT Developer Support
7: *
8: */
9:
10: #import "Controller.h"
11: #import <dbkit/dbkit.h>
12: #import <libc.h>
13:
14: /* Define localized strings */
15: #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.")
16:
17: @implementation Controller
18:
19: /* Extract the actual database and recordlist from the DBModule UI Object
20: */
21: -appDidInit:sender
22: {
23: /* Notify the user if the database can't be found */
24: if (![DBDatabase findDatabaseNamed:"OracleDemo" connect:YES]) {
25: NXRunAlertPanel(NULL, INSTALL_MODEL, "OK", NULL, NULL);
26: return self;
27: }
28:
29: [theWindow makeKeyAndOrderFront:nil];
30: return self;
31: }
32:
33: @end
34:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.