• 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: cocoa bindings and strings shown in 2 different lines of the same table column and row delay in displaying
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cocoa bindings and strings shown in 2 different lines of the same table column and row delay in displaying


  • Subject: Re: cocoa bindings and strings shown in 2 different lines of the same table column and row delay in displaying
  • From: Scott Stevenson <email@hidden>
  • Date: Mon, 27 Nov 2006 00:44:12 -0800


On Nov 26, 2006, at 10:38 PM, vibhatha v wrote:

My problem is now, when the table selection changes, since i have bound that
particular table column, my table view cell displays "string1| rstring2"
intially and after some time gap,
goes to -(void)tableView:(NSTableView *)aTableView willDisplayCell: (id)aCell
forTableColumn:(NSTableColumn*)aTableColumn row:(int)rowIndex
function and then displays the string as expected with different fonts.

This is not what the willDisplayCell method is designed for. Use the NSTableView datasource methods instead:


	-numberOfRowsInTableView:
	-tableView:objectValueForTableColumn:row:
	-tableView:setObjectValue:forTableColumn:row:

Alternately, you can use the Cocoa Bindings only approach with NSArrayController. I think this is much easier. You don't need to implement the above methods if you use Cocoa Bindings.

I think this will help you tremendously:
<http://cocoadevcentral.com/articles/000080.php>

Also, you're probably better off with "\n" for line breaks in Mac OS X instead of "\r".

    - Scott


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >cocoa bindings and strings shown in 2 different lines of the same table column and row delay in displaying (From: "vibhatha v" <email@hidden>)

  • Prev by Date: Re: Connecting to SQLITE
  • Next by Date: How to create a side drawer of fixed height
  • Previous by thread: cocoa bindings and strings shown in 2 different lines of the same table column and row delay in displaying
  • Next by thread: How to create a side drawer of fixed height
  • Index(es):
    • Date
    • Thread