This is AlertPanel.m in view mode; [Download] [Up]
/* AlertPanel.h
* Written By: Thomas Burkholder
*
* 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.
*/
#import "AlertPanel.h"
@implementation AlertPanel
- buttonPressed:sender
{
lastResult = [sender tag];
[NXApp stopModal];
return self;
}
- (int)lastResult
{
return lastResult;
}
- run:sender
{
[self makeKeyAndOrderFront:sender];
[NXApp runModalFor:self];
[self orderOut:self];
return self;
}
- alert { return alert; }
- first { return first; }
- iconButton { return iconButton; }
- message { return message; }
- second { return second; }
- third { return third; }
- write:(NXTypedStream *)stream
{
printf("in write\n");
[super write:stream];
NXWriteTypes(stream,"@@@@@@i",
alert,first,iconButton,message,second,third,lastResult);
return self;
}
- read:(NXTypedStream *)stream
{
printf("in read\n");
[super read:stream];
NXReadTypes(stream,"@@@@@@i",
alert,first,iconButton,message,second,third,lastResult);
return self;
}
- free
{
[first free];
[second free];
[third free];
[iconButton free];
[message free];
[alert free];
return [super free];
}
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.