Re: Documents & Controllers
Re: Documents & Controllers
- Subject: Re: Documents & Controllers
- From: Andreas Mayer <email@hidden>
- Date: Mon, 11 Aug 2003 04:21:53 +0200
Am Sonntag, 10.08.03 um 23:23 Uhr schrieb Seth Willits:
completely working tabbed browsing,
By implementing tabbed browsing you made your life quite a bit more
complicated. :-)
In a simple document based application each window controller displays
only one document. But you are displaying one document for each tab all
in the same window. You will need to account for that in your
communication between the document controllers and the window
controllers.
Since I have no data that I'm manipulating is it correct to have all
of the code in the FWWindowController class?
No. You do have at least the URL. I didn't read about WebCore yet, so I
don't know if there's some data model you could store inside your
document object.
Or should I have created all of my outlets in the MyDocument class?
No. :)
You connect your outlets to the window controller. The window
controller then asks the document controller to do the work. The
document controller instructs the window controller to display the
updated document.
Read more about MVC here:
http://cocoadevcentral.com/articles/000003.php
http://developer.apple.com/documentation/Cocoa/Conceptual/
AppArchitecture/Concepts/MVC.html
Oh one last question. How am I supposed to tell if a method is called
by Cocoa and available for me to override or simply there for me to
call?
By reading the documentation. ;-)
More specifically, I didn't know that readFromFile and writeToFile
were used in the NSDocument class to write to a file. I thought they
were there for me to use in addition to loadDataRepresentation and
dataRepresentationOfType.
http://developer.apple.com/documentation/Cocoa/Conceptual/Documents/
Tasks/ImplementingDocApp.html
bye. Andreas.
_______________________________________________
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.