• 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: Custom TextField/fieldEditor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom TextField/fieldEditor


  • Subject: Re: Custom TextField/fieldEditor
  • From: email@hidden
  • Date: Sun, 28 Apr 2002 22:49:18 +0200

On dimanche, avril 28, 2002, at 10:30 , Mark's Studio wrote:

Im trying to make a custom textField
1. when the field is selected by the mouse it should select all the text
like it does when tabbing to it so i did this

- (void)mouseDown:(NSEvent *)theEvent;
{
[self selectAll:self];

[super mouseDown:theEvent];
}

and it works but i get this
[PMTextField selectAll:]: selector not recognized.

SelectAll does not exist in the documentation AFAIK, selectText: is.

I would not do it this way. I would first check that the view is not the first responder before doing the selectText: call. Otherwise it could create an incoherent behavior.


2. i want to use the up/down arrow keys to step the value
but how do i get the event, keyDown is never called?

Is it the fieldEditor that controls it all selection, keyDown, etc ?
if so how do i setup a fieldEditor with my own behavior?

Why not adding a NSStepper?
_______________________________________________
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: Custom TextField/fieldEditor
      • From: Andy Lee <email@hidden>
References: 
 >Custom TextField/fieldEditor (From: "Mark's Studio" <email@hidden>)

  • Prev by Date: Custom TextField/fieldEditor
  • Next by Date: Re: Custom TextField/fieldEditor
  • Previous by thread: Custom TextField/fieldEditor
  • Next by thread: Re: Custom TextField/fieldEditor
  • Index(es):
    • Date
    • Thread