
#import "InverseObject.h"

@implementation InverseObject

- (void)Calc:sender
{

    float price;
    float tps;
    float subtotal;
    float tvq;
    float total;


	total = [Total floatValue];

	price = (total/1.15025);  // 1.07 X 1.075
 
        tps = (price*.07);

        subtotal = (price+tps);

        tvq = (subtotal*0.075);

        [Price setFloatValue:price];// Display result

        [TPS setFloatValue:tps];// Display result

        [SubTotal setFloatValue:subtotal];// Display result
     	
        [TVQ setFloatValue:tvq];// Display result

	[Total selectText:self]; 
}

// AWAKEFROMNIB
// This is one of the last methods executed after the nib file is loaded.
// This is the BEST way I know how to initialize an object and jump into
// a method after the nib file was loaded, because you are all the methods
// and variables needed can be used. (Unlike init which is not compeletly
// ready when that message is sent
- (void)awakeFromNib
{
        [InversePanel center];
	[InversePanel makeKeyAndOrderFront:NULL];
	[Total selectText:self];
}

@end
