• 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
[Q] am I allowed to call NSTableDataSource informal protocol methods myself?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Q] am I allowed to call NSTableDataSource informal protocol methods myself?


  • Subject: [Q] am I allowed to call NSTableDataSource informal protocol methods myself?
  • From: "Peter.Teeson" <email@hidden>
  • Date: Tue, 27 Apr 2004 15:12:13 -0400

Boy Cocoa is truly fun and I am enjoying learning how to program in it.
(I find Objective-C easy and the Objective-C Language manual of Feb
2004 is extremely well written - one of the clearest I've ever read).
But enough of that - my current question is this:

When I want to access one of the attributes of an NSTableView is it
permitted to call one of the informal protocol methods
(id)tableView: (NSTableView *)tableView objectValueForTableColumn:
(NSTableColumn *)tableColumn row:(int)row
from within a MyDocument method?

Because at present to get the contents of the cell I now do the
following:
.....
// Get the text in the MAC Address cell and validate it
unsigned int row = [tableView selectedRow];
PasswordRecord *pwrec = [passwordRecords objectAtIndex:row];
tempDelimitedString =[pwrec macAddress]; // using the accessor
,,,,,,,
and it occurred to me that it would be more elegant to use
objectValueForTableColumn along the lines of:

tempDelimitedString = [tableView objectValueForTableColumn:[tableView
tableColumnWithIdentifier:@"macAddress"]:[tableView selectedRow]
_______________________________________________
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:
    • RE: [Q] am I allowed to call NSTableDataSource informal protocol methods myself?
      • From: "Jonathan E. Jackel" <email@hidden>
  • Prev by Date: NSController Layer Problem
  • Next by Date: Re: Grabbing key presses in NSTableView
  • Previous by thread: Re: NSController Layer Problem
  • Next by thread: RE: [Q] am I allowed to call NSTableDataSource informal protocol methods myself?
  • Index(es):
    • Date
    • Thread