next up previous contents
Next: RECView.m program listing Up: REC/C for Complex Arithmetic Previous: REC/C operators and predicates

RECView.h header listing

Although the headers for a methods file can contain all the things that ordinary headers do, they are mostly given over to listing objects and method prototypes for their associated file. If the Interface Builder has been used without the benefit of a header file, there is an option called ``unparsing'' which will create one. This is usually done only once when a program is first created. Conversely, if the text of the header file has been changed, the .nib file can be updated by using ``parse.''

It is worth noting that there is no convenient way to supply several arguments to a method which is going to be connected graphically in the Interface Builder. But methods are not supposed to look at each other's data anyway; they should only transmit the data or pointers to the data in response to a request. To know who made a request, and thus where to send the reply, a method can volunteer its own name which the called program can recognize as an argument called :sender, at which time it knows how to ask for further services or data. That is why :sender is the only argument of most of the methods in the prototype list.

/* 
 * RECView.h -- Interface file for the RECView class 
 *
 * 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, or even that it has a use at all.
 *
 */

#import <appkit/appkit.h>

@interface RECView:View {

        id          tiDat;

        id          browser;

        id          exsli;
        id          wysli;
        id          planeView;
        id          planeWindow;
        id          infoPanel;
        id          parPanel;

        id          comment;

        id          execWin;
        id          execLine;
        id          RECValue;

        id          keyWindow;
        id          menuCopy;
        id          menuPrint;

        char        *filename;
        char        **filenames;

        id          windows;
        id          externalRECBox;
        id          internalRECBox;
        id          theBigBox;
        id          theLilBox;
        id          xtrnWin;
}

- ascii:sender;
- recMatrix:sender;

- rexsli:sender;
- rwysli:sender;

- run:sender;
- recompile:sender;
- gho:sender;
- setOption:sender;
- windowWillClose:sender;
- loadRECPanel:sender;
- loadInternal:sender;
- loadExternal:sender;
- loadLowerPaneltwo:thisRuleBox;
- nhul:sender;
- browserDoubleClick:sender;

- open:sender;
- setFilename:(const char *)aFilename;
- save:sender;
- saveAs:sender;

- copyREC:sender;
- copySomeView:theView;
- printREC:sender;

- initFrame:(const NXRect *)frameRect;
- drawSelf:(const NXRect *)rects :(int)rectCount;
- sizeTo:(NXCoord)width :(NXCoord)height;
- mouseDown:(NXEvent *)theEvent;

@end

/* end RECView.h */


next up previous contents
Next: RECView.m program listing Up: REC/C for Complex Arithmetic Previous: REC/C operators and predicates
Microcomputadoras
2001-02-12