|
|
1.1 root 1: //
2: // SimpleCalc -- Randy Nelson -- NeXT Developer Training
3: // A general class that serves as a liaison between a calculator interface
4: // and a calculator engine.
5: //
6: // You may freely copy, distribute and reuse the code in this example.
7: // NeXT disclaims any warranty of any kind, expressed or implied, as to
8: // its fitness for any particular use.
9: //
10: // Created 8-8-90
11: //
12: #import <objc/Object.h>
13:
14: @interface SimpleCalc:Object
15: {
16: // outlets...the front-end.
17: id display;
18: id enterKey;
19: id minusKey;
20: id infoManager;
21: id myNXStringTable;
22:
23: // C++ object's can be a-part-of Objective-C objects.
24: class CalcEngine *cplus_object;
25:
26: // record each previous user action
27: SEL previousAction;
28: }
29:
30: // actions.
31:
32: - numberKeys:sender;
33: - decimalKey:sender;
34: - operationKeys:sender;
35: - equalsKey:sender;
36: - clearKey:sender;
37: - clearAllKey:sender;
38: - infoPanel:sender;
39: - helpPanel:sender;
40:
41: // delegate methods.
42:
43: - windowWillClose:sender;
44: - appDidInit:sender;
45:
46: - registerAction:(SEL)action;
47: - appendToDisplay:(const char *)theString;
48:
49: @end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.