FROM : Uli Kusterer
DATE : Sun May 04 01:31:24 2008
Am 03.05.2008 um 23:45 schrieb Daniel Rampanelli:
> I was thinking wheter it is possible to create a sort of "proxy"
> window which displays the content of another. Of course, the further
> step would be to also pass events from the proxied window to the
> source one. Is this even possible?
What are you trying to do?
Usually, "content" translates to "model", "display" generally
translates to "view", so according to the Model-View-Controller
paradigm, you could create another instance of your controller that
has its own copy of the views, but points at the same model, instead
of forwarding events.
That's one of the advantages of Cocoa's MVC design: If you separate
the view and the model code, you can easily have several windows
showing the same data. It's also more flexible than just duplicating a
window and forwarding its contents, because it can be scrolled to a
different location, can have a different toolbar collapse state, can
be a different size etc.
Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
DATE : Sun May 04 01:31:24 2008
Am 03.05.2008 um 23:45 schrieb Daniel Rampanelli:
> I was thinking wheter it is possible to create a sort of "proxy"
> window which displays the content of another. Of course, the further
> step would be to also pass events from the proxied window to the
> source one. Is this even possible?
What are you trying to do?
Usually, "content" translates to "model", "display" generally
translates to "view", so according to the Model-View-Controller
paradigm, you could create another instance of your controller that
has its own copy of the views, but points at the same model, instead
of forwarding events.
That's one of the advantages of Cocoa's MVC design: If you separate
the view and the model code, you can easily have several windows
showing the same data. It's also more flexible than just duplicating a
window and forwarding its contents, because it can be scrolled to a
different location, can have a different toolbar collapse state, can
be a different size etc.
Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
| Related mails | Author | Date |
|---|---|---|
| Daniel Rampanelli | May 3, 23:45 | |
| Jean-Daniel Dupas | May 4, 00:30 | |
| Jean-Daniel Dupas | May 4, 00:34 | |
| Uli Kusterer | May 4, 01:31 | |
| Daniel | May 4, 13:25 | |
| Uli Kusterer | May 4, 15:53 |






Cocoa mail archive

