• 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: copyWithZone and TableView, firing it sooner?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: copyWithZone and TableView, firing it sooner?


  • Subject: Re: copyWithZone and TableView, firing it sooner?
  • From: Clark Cox <email@hidden>
  • Date: Wed, 21 Jan 2004 18:16:11 -0500

On Jan 21, 2004, at 11:49, Duncan Oliver wrote:

> I'm having a bit of a problem figuring this one out.
>
> I was making a custom ColorWellCell class (currently a subclass of
> NSButtonCell) that basically creates an instance of NSColorWell and
> set's it's frame to that of the cell. Almost everything works fine.
> The only problem I'm having is when a new row is created. If a table
> column has my ColorWellCell set as the dataCell, it doesn't draw
> properly until you try to click in the bounds of the new cell, which
> fires the table views mouseDown: method, and sequentially, the
> dataCell's copyWithZone method. I was wonder if there was anyway to
> make the copyWithZone fire from the dataCell when the row is first
> added, and I was hoping to keep ColorWellCell self-contained. Are the
> cells just not created until they need to receive a action? Am I going
> to have to subclass NSTableView? Thanks for the help.

NSTableView's reuse a single cell for every row in a particular
column. If you don't want this behavior, you can subclass NSTablecolumn
to return a different cell for each row.


--
Clark S. Cox III
email@hidden
http://homepage.mac.com/clarkcox3/
http://homepage.mac.com/clarkcox3/blog/B1196589870/index.html

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.

References: 
 >copyWithZone and TableView, firing it sooner? (From: Duncan Oliver <email@hidden>)

  • Prev by Date: Re: Small animation
  • Next by Date: Re: Q: how do you generate get/set methods?
  • Previous by thread: copyWithZone and TableView, firing it sooner?
  • Next by thread: NSSearchField loses focus
  • Index(es):
    • Date
    • Thread