ImageAndTextCell editing problem

Discussion in 'Mac Programming' started by fernandovalente, Dec 15, 2010.

  1. fernandovalente macrumors 6502

    fernandovalente

    Joined:
    Aug 29, 2008
    Location:
    Third world **** hole, I mean, Brazil
    #1
    Hey,

    I got ImageAndTextCell and I'm using it on a NSOutlineView. When I double click a cell in order to edit it, I get the following error:

    2010-12-16 05:31:54.399 MyApp[26823:a0f] -[NSCFString representedObject]: unrecognized selector sent to instance 0xa0aff968

    Does anyone know a solution for that?
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    Post some related code. Sounds like a memory management issue. Or set a breakpoint on representedObject and see what's happening.
     
  3. fernandovalente thread starter macrumors 6502

    fernandovalente

    Joined:
    Aug 29, 2008
    Location:
    Third world **** hole, I mean, Brazil
    #3
    Nevermind, I found a solution. Just remove the method

    - (NSUInteger)hitTestForEvent:(NSEvent *)event inRect:(NSRect)cellFrame ofView:(NSView *)controlView

    and it will work. Thanks for your reply :)
     

Share This Page