• 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
Fielding another question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fielding another question


  • Subject: Fielding another question
  • From: David Wood <email@hidden>
  • Date: Wed, 22 May 2002 21:02:31 -0400

I finally got the books, so I FINALLY feel I have the right to post questions on the list. My previous question still stands, by the way, since I can't get custom menu items in an Cocoa Document-based application to work. And having done more reading, I have MORE stupid questions...

The app I'm trying to build has some curious interface issues. The best way to describe it: at present, it requires two NSTableViews to pull off. I'm tracking two different kinds of objects (well, four, but those need to be listed in other windows anyway), and it has an effect on the code:

- (void)tableView:(NSTableView *)tableView
setObjectValue:(id)object
forTableColumn:(NSTableColumn *)tableColumn
row:(int)row
{
if (tableView == listChars) {
[[characterKeys objectAtIndex:row] takeValue:object
forKey:[tableColumn identifier]];
[characterKeys sortUsingSelector:@selector(compare:)];
[listChars reloadData];
} else if (tableView == listSubps) {
[[subplotKeys objectAtIndex:row] takeValue:object
forKey:[tableColumn identifier]];
[subplotKeys sortUsingSelector:@selector(compare:)];
[listSubps reloadData];
}
}

For one NSTableView, it's simple enough, but two starts getting hairy. Is there some more elegant way of doing this?

Or better yet... can I create TWO windows in my NSDocument.nib file? This would afford me more screen real estate, windows can be overlapped and moved around as they need to... but NSDocument would still be receiving the tableView:setObkectValue:forTableColumn:row: message, wouldn't it?


--David http://skipjack.bluecrab.org/~dwood

"Well, if I may...I think the interesting thing here is the big swing
to the Silly Party and of course the very large swing back to the
Sensible Party...and a tendency to wobble up and down in the middle
because the screw's loose."
-Monty Python, episode 19
_______________________________________________
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: Fielding another question
      • From: "John C. Randolph" <email@hidden>
  • Prev by Date: Re: Dynamic Languages [was: Re: why Obj-C]
  • Next by Date: Re: Fielding another question
  • Previous by thread: Re: Dynamic Languages [was: Re: why Obj-C]
  • Next by thread: Re: Fielding another question
  • Index(es):
    • Date
    • Thread