I am not sure how one would go about working this, Im writing my first
"test" os/x applications and I am thinking this is probably not right.
Am I doing the retain in the correct place? I tried reading the
documentation on NSTextField but it didnt give me a clue about if I
needed to "retain". (Infact stringValue is not even mentioned in the
NSTextField documentation).
@interface StockListController : NSObject {
IBOutlet NSTextField* stockName;
NSString *newName;
}
-(IBAction) addStockItem:(id)sender;
@end
@implementation StockListController
-(IBAction) addStockItem:(id)sender {
if(newName == nil) [newName release];
newName = [stockName stringValue];
[newName retain];
}
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]