Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / November 2005



Tip: Looking for answers? Try searching our database.

Creating two views for one window with cocoa

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rdiger Sonderfeld - 26 Nov 2005 13:02 GMT
hi,
I have a window (windowA) and I want to create a window (windowB) that shows
the same content as windowA and is live-updated. I think Mac OS X Expose does
something like that.

I tried to use contentView:

[windowB setContentView:[windowA contentView]];

But that destroys the view of windowA.

Is there a way to link two views together?

Regards,
Rüdiger Sonderfeld <kingruedi@c-plusplus.de>
David Phillip Oster - 26 Nov 2005 16:30 GMT
> I have a window (windowA) and I want to create a window (windowB) that shows
> the same content as windowA and is live-updated. I think Mac OS X Expose does
[quoted text clipped - 7 lines]
>
> Is there a way to link two views together?

Normally, your controller keeps a reference to the model, and an array
of all the currently existing views. When the model changes, it notifies
the controller, which determines for each view, how much of that view
needs to be refreshed (default: all). A single user command may cause
many calls to refreshRect:, then, at the end of the event, Cocoa will
call the drawRect: method of each view that needs redrawing.

See:
The Model-View-Controller (MVC) Paradigm
<http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/c
hapter02/chapter_2_section_3.html>

for more information.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.