NSTextViews Help

polaris

Registered
Hi
I'm a noob at mac and cocoa programming.
I have a problem with my program especially dealing with NSTextViews.
In the UI, my program consists of 2 NSTextViews. One takes text input from the user and when a button (NSButton) is pressed, the other NSTextView displays the text (in Braille font) to the user.

I created a controller class instantiated from NSObject.
/* InputController */

#import <Cocoa/Cocoa.h>

@interface InputController : NSObject
{
IBOutlet NSTextView *inputText;
IBOutlet NSTextView *resultTextView;
NSString *string;
}
- (IBAction)displayText:(id)sender;
@end

#import "InputController.h"

@implementation InputController


- (IBAction)displayText:(id)sender
{
NSLog(@"Displaying text.......");
[resultTextView setString:[inputText string]];

}

- (NSString *)string
{
return string;
}

- (void) setString:(NSString *)value
{
[value retain];
[string release];
string = value;
}

- (void) dealloc
{
[string release];
[super dealloc];
}

@end

It's not working and I don't know how to fix it. Here is the GUI.
Can anyone please shed some light for me about NSTextView(s in a window)
Any help would be appreciated because i'm still learning.
Thanks in advance.
Helena

 
Back
Top