The Machine Perception Toolbox

[Introduction]- [News]- [Download]- [Screenshots]- [Manual (pdf)]- [Forums]- [API Reference]- [Repository ]

 

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

MyObject Class Reference

#import <MyObject.h>

List of all members.

Public Member Functions

(void) applicationWillTerminate:
(void) awakeFromNib
(id) init

Protected Attributes

IBOutlet id view
IBOutlet id window


Member Function Documentation

- (void) applicationWillTerminate: (NSNotification *)  notification  
 

Definition at line 112 of file MyObject.mm.

References view.

00112                                 :(NSNotification *)notification
00113 {
00114     [view endGrab];    
00115 }

- (void) awakeFromNib  
 

Definition at line 68 of file MyObject.mm.

References saveQDViewObjectForCallback(), view, and window.

00069 {
00070     NSDictionary        *dict;
00071     NSString            *windowTitle;
00072     OSErr                       err;
00073 
00074     /* grab the name string for our window */
00075     NSString *filePath  = [[NSBundle mainBundle] pathForResource:@"InfoPlist" ofType:@"strings"];
00076     dict                                = [NSDictionary dictionaryWithContentsOfFile:filePath];
00077     windowTitle                 = [dict objectForKey:@"MiniMungWindowTitleString"];
00078 
00079     /* set the window title */
00080         [window setTitle:windowTitle];
00081     
00082     /* pass our view object to our MyQuickDrawView class so we can access methods
00083         in this class from our C code routines */
00084     saveQDViewObjectForCallback(view);
00085 
00086     /* now lets create a window and display the video data passed to us by the sequence grabber */
00087     err = [view doSeqGrab:[view bounds]];
00088     
00089     /* put up an error dialog to display any errors */
00090     if (err != noErr)
00091     {
00092         NSString *errorStr = [[NSString alloc] initWithFormat:@"%d" , err];
00093         int choice;
00094 
00095         /* now display error dialog and quit */
00096         choice = NSRunAlertPanel(@"Error", errorStr, @"OK", nil, nil);
00097         [errorStr release];
00098     }
00099     
00100 }

Here is the call graph for this function:

- (id) init  
 

Definition at line 45 of file MyObject.mm.

00046 {
00047     /* we'll want to be called when the application
00048      quits so we can do any cleanup */
00049      
00050     [[NSNotificationCenter defaultCenter] addObserver:self
00051         selector:@selector(applicationWillTerminate:)
00052         name:@"NSApplicationWillTerminateNotification" object:NSApp];
00053 
00054     return self;
00055 }


Member Data Documentation

- (IBOutlet id) view [protected]
 

Definition at line 28 of file MyObject.h.

Referenced by applicationWillTerminate:, and awakeFromNib.

- (IBOutlet id) window [protected]
 

Definition at line 29 of file MyObject.h.

Referenced by awakeFromNib.


The documentation for this class was generated from the following files:
Generated on Mon Nov 8 17:08:40 2004 for MPT by  doxygen 1.3.9.1