• 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
handling clicks in custom matrix's cells
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

handling clicks in custom matrix's cells


  • Subject: handling clicks in custom matrix's cells
  • From: nicolas berloquin <email@hidden>
  • Date: Mon, 6 May 2002 15:21:59 +0200

Hi !

I'm pulling my hair so much I'm getting bald about this problem.

alright here's what I have:
Inside a window, there is an NSMatrix that I create dynamically with a custom cell class that I pass as an init parameter (and NSListModeMatrix).
this cell class (inherited from NSActionCell), is defined as a nulltype cell.
during the init phase of my cell class, I retrieve an NSView hierarchy from a NIB file, which is quite simple:
NSView
--- NSImageView
--- NSTextField

(--- = subview)

I then set this view hierarchy as the subview of the controller.

everything displays fine on screen, I can see the images and the text, at the right place etc etc.

the problem comes from clicks (as the title said).
I set programmatically the target and action of the nsimageview to my cell class, but I never get the clicks.
BUT I get clicks from the text (which is not editable) withtout any problems !!
I checked in dbg and the nextresponder of the imageview and the text are the same (--> the cell)
(same for superview etc, they ARE at the same sub-level).

I tried setting target and action to nil, to the cell, to the control, to whatever, and I never get anything
when I click on the image...

what am I doing wrong ??

and btw, when I click on the text, I can see my cell as selected, the selection color being drawn around the
image (which is what it should be).

thanks !

[ "to baldly go where no one has gone before", says captain picard... ^_^]
_______________________________________________
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:
    • handling clicks in custom matrix's cells bis
      • From: nicolas berloquin <email@hidden>
  • Prev by Date: Re: Does the windowDidResize really work while resizing?
  • Next by Date: Re: Current application
  • Previous by thread: Re: Does the windowDidResize really work while resizing?
  • Next by thread: handling clicks in custom matrix's cells bis
  • Index(es):
    • Date
    • Thread