• 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: Using Field Editor correctly in custom NSCell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using Field Editor correctly in custom NSCell


  • Subject: Re: Using Field Editor correctly in custom NSCell
  • From: Alastair Houghton <email@hidden>
  • Date: Wed, 23 Jun 2010 14:24:00 +0100

On 23 Jun 2010, at 02:56, Graham Cox wrote:

> For example, it seems that the cell should override -setUpFieldEditorAttributes: but what should this method actually do? In the cell code I have, this method has been commented out, and the field editor "set up" is being done in -editWithFrame:inView:editor:delegate:event: (and the same set up is repeated in the -selectWithFrame:... method). Clearly this is wrong since it doesn't work. However, if I uncomment the -setUpFieldEditorAttributes: method, it's no better - at first the text is the right size but reverts to the bigger font when I type, and at the end of editing the field editor doesn't go away as it should, so the label is just overdrawn with a blank white box.

Just OTOH, it sounds like the field editor's delegate may be pointing to the wrong place (it should point at the NSControl), or that the control isn't implementing the NSText delegate methods as expected (you can see in the NSTextField docs what they're supposed to do).  Also, the changing font thing sounds like perhaps the typing attributes aren't set on the field editor.

Kind regards,

Alastair.

--
http://alastairs-place.net



_______________________________________________

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

References: 
 >Using Field Editor correctly in custom NSCell (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: File descriptors not freed up without a -closeFile call
  • Next by Date: Re: File descriptors not freed up without a -closeFile call
  • Previous by thread: Using Field Editor correctly in custom NSCell
  • Next by thread: Initiating drag and drop from NSToolbarItem
  • Index(es):
    • Date
    • Thread