ftp.nice.ch/pub/next/developer/apps/Eval.3.3.s.tar.gz#/Eval3.3/EvalObject.m

This is EvalObject.m in view mode; [Download] [Up]

#import "EvalObject.h" 
#import <appkit/appkit.h>

/**
 ** EvalObjects are just like Objects, 
 ** except that they do not kill off
 ** the application when they receive
 ** a message they can't understand.
 ** Instead, they pop up an alert panel,
 ** allowing the user to either continue,
 ** abort the evaluation (by raising an exception),
 ** or abort Eval.
 **/

@implementation EvalObject: Object
{
}

+ doesNotRecognize: (SEL)aSelector ;
{ int rval ;
  rval = NXRunAlertPanel("Eval",
     "\tError:\n Class %s doesNotRecognize:\n\t+%s","Continue","Abort Eval",
      NULL, [self name], sel_getName(aSelector)) ;
  if(rval == 1) // i.e. continue
    return self ;
  [self error: "Eval aborted by user\n"] ;
  return self ;
} 

 
- doesNotRecognize: (SEL)aSelector ;
{ int rval ;
  rval = NXRunAlertPanel("Eval",
     "\tError:\nInstance %s of class %s doesNotRecognize:\n\t-%s","Continue","Abort Eval",
      NULL, [self name], [[self class] name], sel_getName(aSelector)) ;
  if(rval == 1) // i.e. continue
    return self ;
  [self error: "Eval aborted by user\n"] ;
  return self ;
} 


@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.