//
//  Demo for HKCrashTrap
//
// By ivo  ivo@hasc.ca

#import "AppDelegate.h"
#import "HKCrashTrap.h"

@implementation AppDelegate

- appDidInit:sender
{
	[window makeKeyAndOrderFront:self];
	return self;
}

- afterCrashMatrixHit:sender
{
	[HKCrashTrap setContinueAfterError:([[sender selectedCell] tag]?NO:YES)];
    return self;
}

- nullCrashHit:sender;
{
	char *p = NULL;
	fprintf(stderr,"About to crash referencing a NULL ptr.\n");
	*p = 1;
    return self;
}

- unimplementedCrashHit:sender;
{
#warning The following 'does not repond to' warning is intentional! 
	[self callSomethingNotImplemented];   // Make me crash!!!
    return self;
}

- freedObjectCrashHit:sender;
{
	id o;
	
	o = [[Object alloc] init];
	[o free];
	[o hash];
	return self;
}

@end
