• 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
Newbie: two tables on one window, how to talk to them?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie: two tables on one window, how to talk to them?


  • Subject: Newbie: two tables on one window, how to talk to them?
  • From: Keith Pritchard <email@hidden>
  • Date: Mon, 2 Sep 2002 16:44:18 +0100

Hi all,

In my first few days of cocoa having come from delphi and c on the
pc.... so apologies for what I'm sure will seem a trivial question.

My first app. is usually an nntp (news) client.. albeit a very simple
one.

I've laid out the user interface as basically 2 TableViews (to show the
newsgroups) , an OutlineView(to show the articles with threading) and
a textview for the body of the article (though I may need to rethink
that later).

So far, I have it connecting to a server, pulling down a list of groups
and displaying them in the tableview.

Now I want to display data in the second table... and looking over the
code, this is why I think I've mangled the MVC ideas...

All my work is done inside the only class I've made,
newsController.m/h I have a couple of arrays one per table... this is
where I have the needed functions:-
- (int) numberOfRowsInTableView:(NSTableView *)TableView

etc.

Question is, this works when I have one table, when I want to talk to
another, how do I do it? Do I compare TableView somehow to see which
table it's responding to? Or have I (as I suspect) made a mess of
seperating out the data model from the controller (ie. I havent
seperated them!).

As I said, probably a hopelessly newbie question, but I want to try and
get the MVC stuff right from day one so I thought I'd ask before I
started fudging things to get them working.

Thanks in advance,
Keith
_______________________________________________
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: Newbie: two tables on one window, how to talk to them?
      • From: Chris Hanson <email@hidden>
    • Re: Newbie: two tables on one window, how to talk to them?
      • From: "Tony S. Wu" <email@hidden>
  • Prev by Date: Re: sourceforge, nibs and other wrappers
  • Next by Date: Re: Newbie: two tables on one window, how to talk to them?
  • Previous by thread: Re: sourceforge, nibs and other wrappers
  • Next by thread: Re: Newbie: two tables on one window, how to talk to them?
  • Index(es):
    • Date
    • Thread