Strange Difference between volumeName and volumeNameX
I've just started learning cocoa and had a go at typing in those lovely example programs...
Can't get simpler than changing a label when you press a button...
However if I name the NSTextField as volumeName it doesn't work.
If I change it and the connections to volumeNameX it does work.
I tried searching for volumeName in case it's some reserved label but it doesn't appear in a search of the API's.
Any ideas ?
Dave.
Test.h
<code>
#import <Cocoa/Cocoa.h>
@interface Test : NSObject {
// Change this to anything but volumeName and everything works fine.
IBOutlet NSTextField *volumeName;
}
- (IBAction)setVolumeName:(id)id;
@end
</code>
Test.m
#import "Test.h"
@implementation Test
- (IBAction)setVolumeName:(id)id
{
// Change this to anything but volumeName and everything works fine.
[volumeName setStringValue:@"Hello There"];
}
@end