i have an NSBox that is used as a dropbox... whenever something is dropped into the drop box i want the performDragOperation method to direct to anotherMethod in my App Controller class, but it doesn't work... i'm pretty sure i have everything linked correctly in IB, so i don't understand what's going on.
NSBox Class:
AppController Class:
i understand it is easy just to write NSBeep() in with the performDrapOperation method, but this isn't really my work – this is an example that illustrates my exact problem.
any help would be appreciated.
NSBox Class:
Code:
#import <Cocoa/Cocoa.h>
#import "AppController.h"
@interface DropBox : NSBox
{
IBOutlet AppController *appControllerRedirect;
}
@end
--------------------------------------------------
#import "DropBox.h"
#import "AppController.h"
@implementation DropBox
//some drag and drop methods
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{
//some pasteboard stuff
NSLog(@"item dropped in drop box"); [COLOR="SeaGreen"]//This gets called and displays In the console window, so i know the drag and drop methods within this class are coded correctly[/COLOR]
[appControllerRedirect alertSound:nil]; [COLOR="Red"]//This doesn't get called. why not??!![/COLOR]
return YES;
}
AppController Class:
Code:
#import <Cocoa/Cocoa.h>
@interface AppController : NSObject
{
}
- (IBAction)alertSound:(id)sender;
@end
--------------------------------------------------
#import "AppController.h"
@implementation AppController
- (IBAction)alertSound:(id)sender
{
NSBeep();
}
i understand it is easy just to write NSBeep() in with the performDrapOperation method, but this isn't really my work – this is an example that illustrates my exact problem.
any help would be appreciated.