|
|
1.1 root 1: {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;\f2\fnil Times-Roman;\f1\fmodern Ohlfs;}
2: \paperw13700
3: \paperh11400
4: \margl120
5: \margr120
6: {\colortbl;\red0\green0\blue0;}
7: \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b\i0\ulnone\fs36\fc0\cf0 TableViewExample
8: \b0\fs24 \
9: by Mai Nguyen, NeXT Developer Support Team\
10: \
11:
12: \b\fs28 Overview
13: \b0\fs24 \
14: \
15: In order to run this example, you need to have a Sybase server with a pubs database installed. This example uses the
16: \b SybaseDemo.dbmodela
17: \b0 model file (also available under /NextDeveloper/Examples/DatabaseKit/Models).\
18:
19: \i For Oracle users, you can modify the TableViewController.m file to comment out #define SYBASE_DEMO and recompile the application.\
20: \
21:
22: \i0 This example shows how you can define a DBTableView and a DBModule programmatically instead of using the corresponding Interface Builder UI Objects .
23: \fc1\cf1 It also shows how you can change the sort order every time the columns in the tableview are rearranged. The sort property is determined by the identifiers of the tableview columns.\
24:
25: \fc0\cf0 \
26:
27: \b\fs28\fc1\cf1 Program Organization
28: \b0\fs24 \
29: \
30:
31: \b Major Classes in the Application
32: \b0 \
33: \
34: \
35:
36: \pard\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fi-1900\li1900\fc1\cf1 TableViewController A general manager object. A subclass of the Object class. Performs miscellaneous initialzations for the DBModule and DBTableView objects. \
37:
38: \pard\tx560\tx1120\tx2060\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\fi-2060\li2060\fc1\cf1 \
39: \
40:
41: \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\b\fc1\cf1 Other Peculiarities
42: \b0 \
43: In order to load an Adaptor dynamically, you need to add the
44: \b OTHER_LDFLAGS
45: \b0 definition (see the
46: \b Makefile.preamble
47: \b0 ). You also need to add the
48: \b libdbkit_s.a
49: \b0 library into your
50: \b PB.project
51: \b0 under
52: \b libraries
53: \b0 in order to use the DBKit API. \
54: \
55:
56: \b\fs28 Topics Of Interest
57: \b0\fs24 \
58:
59: \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\b\fc1\cf1 \
60: - How to get all the attributes from an entity and the sub-attributes that belongs to a one-to-one relationship of\
61: that same entity
62: \b0 \
63: See the method
64: \b initTableView:
65: \b0 in the file TableViewController.m.\
66:
67: \f2\fs28 \
68:
69: \f0\b\fs24 - How to make a fetchgroup become the datasource of the tableview by using the method \
70: makeAssociationFrom:
71: \b0 \
72: See the method
73: \b initTableView:
74: \b0 in the file TableViewController.m\
75:
76: \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc1\cf1 \
77: -
78: \b How to replicate the IB connections to a tableview by using DBExpressions\
79:
80: \b0 See the method
81: \b addTableColumn
82: \b0 in the file TableViewController.m\
83: \
84: \
85:
86: \pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\b\fs28\fc1\cf1 Change History
87: \b0\fs24 \
88: February 1993 Updated for 3.1
89: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.