• 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
changing string in a view based NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

changing string in a view based NSTableView


  • Subject: changing string in a view based NSTableView
  • From: Koen van der Drift <email@hidden>
  • Date: Sat, 07 Jul 2012 16:44:22 -0400

I'd like to change the change the string that is displayed in my view based NSTableView to a lowercase string. So I implemented the following in the delegate of the tableview:

- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
{
	 MyTableCellView *result = [tableView makeViewWithIdentifier:tableColumn.identifier owner:self];
	NSString *key = result.keyTextField.stringValue;

	result.keyTextField.stringValue= [key.stringValue lowercaseString];

    	return result;
}

keyTextField is an outlet in my custom NSTableCellView. The code gets called, but the string is not affected, because key is an empty string.  All valuables are visible in the table view, so everything else seems to be hooked up correctly (using bindings).

If I change one line to:

    result.keyTextField.stringValue = @"Test";

Only a few of the rows will show the word Test, all others will show the value set by the bindings


What am I missing?

Thanks,

- Koen.




_______________________________________________

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

  • Prev by Date: Re: Problem adding subview to NSScroller subclass
  • Next by Date: Re: Problem adding subview to NSScroller subclass
  • Previous by thread: [Solved] Custom NSViews
  • Next by thread: Document Based Application
  • Index(es):
    • Date
    • Thread