|
|
1.1 root 1: /* QBE.h:
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 Craig Federighi
7: *
8: *
9: * Example of a Query By Example object: Connects to an EOController for an
10: * easy contruction of qualifiers from data entered into fields of an
11: * existing user interface.
12: */
13:
14: #import <appkit/appkit.h>
15: #import <eointerface/eointerface.h>
16: #import <apps/InterfaceBuilder.h>
17:
18: @interface QBE:Object
19: {
20: EOController *controller;
21: EODatabaseDataSource *realsource;
22:
23: NSMutableArray *removedAssociations;
24: EOController *nextController;
25: id controllersDelegate;
26: NSMutableArray *wereUneditableAssoc;
27: NSMutableArray *wereEditableAssoc;
28:
29: EOQualifier *originalQualifier;
30: }
31:
32: - enterQueryMode:sender;
33: // switches controller from displaying database
34: // data to displaying a blank row in which query info can be entered.
35: // Sending this message when already in Query mode will add a new row to
36: // the controller to allow entry of another disjoined qualifier.
37:
38: - toggleQueryFetch:sender;
39: // if not in query mode, enters query mode. If in query mode, does
40: // applyQualifier (and exits query mode)
41:
42: - applyQualifier:sender;
43: // constructs a qualifier with ANDing within columns and ORing rows
44: // Sets the qualifier in the datasource and issues a fetch on the
45: // controller.
46:
47: - applyDisjointQualifier:sender;
48: // like applyQualifier, but ORs within columns
49:
50: - exitQueryMode:sender;
51: // reverts to original qualifier and fetches.
52:
53: - addQuery:sender;
54: // add a line to the query controller and select it
55:
56: @end
57:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.