/* AdderInspectorController.m created by todd on Tue 14-May-1996 */

#import <AppKit/AppKit.h>

#import "AdderController.h"
#import "Adder.h"
#import "AdderInspectorController.h"


@implementation AdderInspectorController

// Accessor methods

- (NSTextField*) firstNumberTF { return firstNumberTF; }
- (NSTextField*) secondNumberTF { return secondNumberTF; }
- (NSTextField*) resultTF { return resultTF; }

// Updating the inspector

- (void) update
/*"
   This method is called every time the controller that we are
   inspecting changes. We then update our UI to reflect the
   new state.
"*/
{
    AdderController* adderController;
    Adder* adder;
    
    adderController = (AdderController*)[self inspectedController];
    adder = [adderController adder];

    [[self firstNumberTF] setFloatValue:[adder firstNumber]];
    [[self secondNumberTF] setFloatValue:[adder secondNumber]];
    [[self resultTF] setFloatValue:[adder result]];
}

@end
