set***Value: Method not working
set***Value: Method not working
- Subject: set***Value: Method not working
- From: Jeremy Dronfield <email@hidden>
- Date: Sun, 30 Jun 2002 17:39:14 +0100
Can anyone suggest why the following -setCountValue: method isn't
working?
--------------------------------------------------------
@implementation SRBookmarkController
. . .
- (IBAction)goAction:(id)sender
{
. . .
[[self textField] setIntValue:[theCount intValue]]; // Testing here
that theCount actually contains a value. It does.
[[self sRControls] setCountValue:[theCount intValue]]; // Tried
different things here, including -setCountValue:9. Nothing works.
}
--------------------------------------------------------
@implementation SRControls
. . .
- (void)setCountValue:(int)value
{
segCount = value;
}
- (int)segCount {
return segCount;
}
--------------------------------------------------------
I've checked and double-checked all the @class declarations and #import
statements. I haven't included all the code here, because I'm convinced
everything is correct. I'm not getting any build or runtime errors.
Also, I've got a similar -set***Value: method which passes an integer
value in the other direction (from SRControls to SRBookmarkController)
and works perfectly. Additional information: SRControls is an NSObject
subclass in the MainMenu.nib, acting as File's Owner delegate.
SRBookmarkController is an NSWindowController subclass acting as File's
Owner in a separate nib. All my other communications between them are
working. Also I'm pretty positive this has nothing to do with
releases/retains.
I'm completely flummoxed.
- Jeremy.
_______________________________________________
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.