Re: How to check if NSTextField is selected?
Re: How to check if NSTextField is selected?
- Subject: Re: How to check if NSTextField is selected?
- From: "Jordan Evans" <email@hidden>
- Date: Thu, 28 Sep 2006 11:09:14 -0700
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.
if ( field == GMTOffset )
{
NSLog(@"GMTOffset");
}
if ( field == seconds )
{
NSLog(@"seconds");
}
if ( field == minutes )
{
NSLog(@"minutes");
}
// ... more if's
}
Have I got this set up right, or where am I going wrong?
_______________________________________________
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