next up previous
Next: RECView.m Program Listing Up: REC-F for Flexagons Previous: REC 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. Conversely, if the text of the header file has been changed, the .nib file can be updated by using ``unparse.''

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 to whom 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                browser;

        id                exsli;
        id                wysli;
        id                bigView;
        id                bigWindow;
        id                infoPanel;
        id                parPanel;

        id                comment;

        id                lilView;
        id                lilWindow;
        id                execWin;
        id                execLine;
        id                value;

        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;

- smartPrintBigWin:sender;
- openBigWin:sender;

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

- copyREC:sender;
- copySomeView:theView;

- 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
Next: RECView.m Program Listing Up: REC-F for Flexagons Previous: REC operators and predicates
Microcomputadoras
2000-09-28