• 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
Datasource for tableview and more
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Datasource for tableview and more


  • Subject: Datasource for tableview and more
  • From: "Mark's Studio" <email@hidden>
  • Date: Sat, 1 Sep 2001 20:57:58 +0200

Is it possible for one controller class be the datasource for multiply
tableviews?

I am making a document based application to learn cocoa i got must of it
working,
its an Address book and it have one mainwindow with a tableview.
1 Address class
2 MyDocument is the controller for the mainwindow and has a
NSMutableArray of Addresses witch are the datasource for the tableview.

but now i want to add a second tableview in a drawer to the main window
where i can select a group of addresses.
So i made a new Group class and a GroupController witch has a
NSMutableArray of Groups (more or less a simple copy of what i already
had) and that's working.

but my problem is that MyDocument needs full access to the
NSMutableArray of Groups witch are in the GroupController.

This is where my skills as a programmer stops.
to be honest i don't understand the documentation on ObjC, all that
sharedInstance and stuff like that,
i used the preferences class from TextEdit as a starting point and
changed it to fit my application and got it to work
but i still don't understand what's going on.

Cocoa is so great so it got me back into programming, i've only done
plain C earlier and not anything big, C++ and i gave up
i've read many books on it but i never understood object oriented
programming full.
Is there a very simple way to describe it or an example so i could get
that aha feeling.

Thanks
Peter Mark

Mark's Recording Studio A/S
Faelledvej 19 b DK2200 N
Copenhagen Denmark
Tel: +45 35366078 Fax: +45 35366038
www.marks-studio.dk
email@hidden


  • Prev by Date: Final int?
  • Next by Date: Re: Final int?
  • Previous by thread: RE: Final int?
  • Next by thread: Re: Datasource for tableview and more
  • Index(es):
    • Date
    • Thread