Can't bind my array to that scrollview
Can't bind my array to that scrollview
- Subject: Can't bind my array to that scrollview
- From: email@hidden
- Date: Wed, 29 Jun 2005 13:14:55 +0200
Hi,
I am just beginning in Cocoa and I am trying to learn bindings.
I made a very simple Class named "Query" that has two instance variables : input
(a NSNumber) and output (a NSArray). Well, here the code from "query.m" :
@implementation Query
- (id) init {
self = [super init];
if (self != nil) {
[self setInput:[NSNumber numberWithInt:5]];
[self setOutput:[NSArray arrayWithObjects:@"one",@"two",@"three",nil]];
}
return self;
}
- (void) setInput : (NSNumber *) theInput {
input = theInput;
}
- (void) setOutput : (NSArray *) theOutput {
output = theOutput;
}
- (NSNumber *) input {
return input;
}
- (NSArray *) output {
return output;
}
@end
I bound input to a text field, it worked ok.
I bound output to a NSScrollView and, instead of displaying "one", "two",
"three" on a different line, it displays the following string :
"(one,two,three)" on the first line of my scroll view.
Why is that ?
Thanks for your help,
Martin.
_______________________________________________
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