Re: Re: How to check if NSTextField is selected?
Re: Re: How to check if NSTextField is selected?
- Subject: Re: Re: How to check if NSTextField is selected?
- From: "Shawn Erickson" <email@hidden>
- Date: Thu, 28 Sep 2006 11:39:32 -0700
On 9/28/06, Jordan Evans <email@hidden> wrote:
Shawn,
The link was excellent, what seemed obvious didn't solve my problem.
Here is the code where the problem is:
- (IBAction)findTextField:(id)sender
{
NSTextField *field = [[thePanel firstResponder] delegate];
// I have intial values in the texts fields. The NSLog always
produces the value in the selected field. So, the field pointer is
referencing the object's values fine.
NSLog(@"field: %i", [field intValue]);
// Here is where the problem occurs. It only produces an NSLog for
GMTOffset, not the others.
Do you mean it always produces the GMTOffset log message regardless of
field being edited or that only when editing the "GMTOffset" field do
you get that log message with no log message for any of the other
fields?
Two possible sources of the problem come to mind (based on what code
you have posted)....
1) findTextField: is only being called in response to the GMTOffset
field (I assume target-action is being used here... in other words are
you sure the other NSTextFields have their target and action correctly
configured).
2) The "minutes" and "seconds" (assuming they are IBOutlets) aren't
connected to their related text fields.
-Shawn
_______________________________________________
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