• 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
custom field editor results in no focus ring
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

custom field editor results in no focus ring


  • Subject: custom field editor results in no focus ring
  • From: David Alter <email@hidden>
  • Date: Thu, 23 Apr 2009 15:20:08 -0700

I was looking at using a customer field editor for my NSTextField. I have
read over the docs at Text Editing Programming Guide for Cocoa: Working With
the Field Editor<http://developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/TextEditing/Tasks/FieldEditor.html>.
In my Window delegate I added the -(id)windowWillReturnFieldEditor:(NSWindow
*)sender toObject:(id)anObject method. If I create a custom field editor, my
NSTextField no longer get a focus ring. This happens even if my field custom
field editor is a NSTextView.
Here is my code from my window delegate

-(id)windowWillReturnFieldEditor:(NSWindow *)sender toObject:(id)anObject
{
    if ([anObject isKindOfClass:[NSTextField class]])
    {
        return [[[NSTextView alloc] initWithFrame:[anObject frame]]
autorelease];
    }
   return nil;
}

I suspect that I'm not connecting something correctly, I'm jut not sure
what. Can someone help clarify what is happening here.

thank
-dave
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • RE: custom field editor results in no focus ring
      • From: Ulai Beekam <email@hidden>
  • Prev by Date: NSTableView variable row height and noteHeightOfRowsWithIndexesChanged during live resize
  • Next by Date: Re: Problem implementing keyPathsForvaluesAffecting<Key>
  • Previous by thread: Re: NSPopUpButton with "multiple selection" state (like NSMixedState)
  • Next by thread: RE: custom field editor results in no focus ring
  • Index(es):
    • Date
    • Thread