MVC problem
MVC problem
- Subject: MVC problem
- From: Luc Vandal <email@hidden>
- Date: Fri, 11 Feb 2005 15:49:56 -0500
Hi!
I'm new at developping on Mac with Cocoa and I'm experimenting. I have a problem with MVC. I have my controller class that calls a function to my model class but the model class function isn't called. In debug mode, if I try to do a step into the model class function, it won't! It just goes through the line like nothing was there! I get no error or warnings while compiling. I've followed the Currency Converter. The only difference is that the controller class derives from NSWindowController and not NSObject... here's my code:
/* VRAppModel */
#import <Cocoa/Cocoa.h>
@interface VRAppModel : NSObject
{
}
- (int)test;
@end
-----
#import "VRAppModel.h"
@implementation VRAppModel
- (int)test
{
int i = //VRStartApp();
return i;
}
@end
----
/* VRAppController */
#import <Cocoa/Cocoa.h>
#include <VRAppModel.h>
@interface VRAppController : NSWindowController
{
IBOutlet VRAppModel *appModel;
IBOutlet NSTextView *mainView;
IBOutlet NSTextView *statusView;
IBOutlet NSOutlineView *treeView;
}
----
#import "VRAppController.h"
@implementation VRAppController
//
// keyDown
// for shortcuts that are not available through the menu
//
/////////////////////////////////////////////////////////
-(void)keyDown:(NSEvent*)event
{
int i=0;
i = [appModel test]; //This line is disregarded!!!
}
What is the problem? _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden