• 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: Re: How to check if NSTextField is selected?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Re: How to check if NSTextField is selected?
      • From: "Jordan Evans" <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>)
 >Re: How to check if NSTextField is selected? (From: "Jordan Evans" <email@hidden>)

  • Prev by Date: Re: Creating reflected style Images from NSImage
  • Next by Date: Re: NSimage leaking memory or probably just me
  • 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