RE: Setting the receiving textfield in code
RE: Setting the receiving textfield in code
- Subject: RE: Setting the receiving textfield in code
- From: <email@hidden>
- Date: Sun, 21 Jul 2002 00:18:30 +0200
- Thread-topic: Setting the receiving textfield in code
Nico,
>
You can't use [NSString stringWithFormat:..........] like that, your
>
NSTextField is not an NSString :P
>
You might want to use [self valueForKey:[NSString
>
stringWithFormat:...............]] instead : there you directly access
>
to your instance variable.
>
You can so use your modified code :
>
for (i = 0; i < 6; i++) {
[[self valueForKey:[NSString stringWithFormat: @"textField%d", i+1]]
setStringValue:[myString characterAtIndex:i]];
}
That was exactly the construction I was looking for!! Thanks!
I knew my initial attempts weren't working because I was directing the string instead of the textfield,
and I just knew it should be possible, but then where to look?? Again thanks for the hint, I'll try to see if I get it to work now...
Alex
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.