• 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(2): NSTextField selectText behaviour (Currency Converter Tut)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re(2): NSTextField selectText behaviour (Currency Converter Tut)


  • Subject: Re(2): NSTextField selectText behaviour (Currency Converter Tut)
  • From: Lachlan Deck <email@hidden>
  • Date: Sat, 18 Jan 2003 10:23:52 +1100

Hi there,

Okay - I haven't got any responses yet from someone who knows what's happening here, so any help would be much appreciated.

Cheers.

On Friday, January 17, 2003, at 04:53 PM, Lachlan Deck wrote:

Hi there,

Okay, I've checked the archives and what I'm seeing is commonly experienced by most.
In ConverterController.m I have the following...

- (IBAction)convert:(id)sender
{
...
[rateField selectText:self];
}

Now what most people experience is that if you click the Convert button, then the NSTextField, rateField, gains the focus and its text is selected. However, if the user presses the Enter or Return key (even though it's set to be the Equiv in Interface Builder) that the currently selected NSTextField retains the selection.

I'm guessing that there is a conflict of interest here. i.e., an NSTextField reacts to a typed key (such as Return), however we are trying to remove the focus from the field (which happens automatically if you click with the mouse on the Convert button).

What is the easiest way to, for example, unconditionally focus the cursor (and thus with selectText method above) for an NSTextField?

Thanks very much.

with regards,

--
Lachlan Deck
email@hidden
_______________________________________________
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.

  • Follow-Ups:
    • Re: Re(2): NSTextField selectText behaviour (Currency Converter Tut)
      • From: Bryan Blackburn <email@hidden>
References: 
 >NSTextField selectText behaviour (Currency Converter Tut) (From: Lachlan Deck <email@hidden>)

  • Prev by Date: Re: Deadlock with -setApplicationIconImage in a drawing thread
  • Next by Date: [cawug] Meeting - Chicago CAWUG Tuesday Jan 21st
  • Previous by thread: Re: NSTextField selectText behaviour (Currency Converter Tut)
  • Next by thread: Re: Re(2): NSTextField selectText behaviour (Currency Converter Tut)
  • Index(es):
    • Date
    • Thread