Annotation of Examples/DatabaseKit/Evaluator/SQLPanel.m, revision 1.1.1.1

1.1       root        1: /* SQLPanel.m:
                      2:  * You may freely copy, distribute, and reuse the code in this example.
                      3:  * NeXT disclaims any warranty of any kind, expressed or  implied, as to its
                      4:  * fitness for any particular use.
                      5:  *
                      6:  * A simple panel to trace SQL queries generated by the Database Kit.
                      7:  *
                      8:  */
                      9: 
                     10: #import "SQLPanel.h"
                     11: #import        "ScrollViewExtras.h"
                     12: 
                     13: @implementation SQLPanel
                     14: 
                     15: - orderFront:sender
                     16: {
                     17:     [scrollView clear:self];
                     18:     [[[[NXApp mainWindow] delegate] database] setDelegate:self];
                     19:     [super orderFront:sender];
                     20:     return self;
                     21: }
                     22: 
                     23: - windowWillClose:sender
                     24: {
                     25:     [scrollView clear:self];
                     26:     [[[[NXApp mainWindow] delegate] database] setDelegate:nil];
                     27:     return self;
                     28: }
                     29: 
                     30: - (BOOL)db:aDb notificationFrom:anObject
                     31:      message:(const unsigned char *)message code:(int)code
                     32: {
                     33:     [scrollView sprintf:"(%d) %s\n", code, message];
                     34:     return YES;
                     35: }
                     36: 
                     37: - (BOOL)db:aDb willEvaluateString:(const unsigned char *)string
                     38:      usingBinder:aBinder
                     39: {
                     40:     [scrollView sprintf:"%s\n", string];
                     41:     return YES;
                     42: }
                     43: 
                     44: @end

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.