• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to check if NSTextField is selected?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Re: How to check if NSTextField is selected?
      • From: "Shawn Erickson" <email@hidden>
References: 
 >How to check if NSTextField is selected? (From: "Jordan Evans" <email@hidden>)
 >Re: How to check if NSTextField is selected? (From: Shawn Erickson <email@hidden>)

  • Prev by Date: NSimage leaking memory or probably just me
  • Next by Date: Creating reflected style Images from NSImage
  • Previous by thread: Re: How to check if NSTextField is selected?
  • Next by thread: Re: Re: How to check if NSTextField is selected?
  • Index(es):
    • Date
    • Thread