I'm not new to this, but I've taken a break from programming. I say that because it sounds stupid...
My textfield is sending a notification twice! Worse than that, it types the letter twice! Without anything set up it types and acts normally, plain old text field. If I set the appDelegate to the text field's delegate using IB and then use the following code:
It starts double typing each character and sending the notification twice.
Any help appreciated!!!
Richard
My textfield is sending a notification twice! Worse than that, it types the letter twice! Without anything set up it types and acts normally, plain old text field. If I set the appDelegate to the text field's delegate using IB and then use the following code:
Code:
#import <Cocoa/Cocoa.h>
#import "RBMExpression.h"
@interface RBMAppDelegate : NSObject <NSApplicationDelegate>
- (void)controlTextDidChange:(NSNotification *)aNotification;
@property (strong) IBOutlet NSTextField *myTextField;
@property (assign) IBOutlet NSWindow *window;
@end
#import "RBMAppDelegate.h"
@implementation RBMAppDelegate
@synthesize myTextField = _textField;
@synthesize window = _window;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
// Insert code here to initialize your application
}
- (void)controlTextDidChange:(NSNotification *)aNotification
{
NSString *theString = [_textField stringValue];
[RBMExpression expressionWithString:theString];
}
@end
It starts double typing each character and sending the notification twice.
Any help appreciated!!!
Richard