NSDocument and control of multiple views

  • I have a document-based application that has a custom view that fills
    much of the content view. In that custom view I want to display a
    "page" like a piece of paper. As the window is scaled, the "page"
    scales. This all works either if I code the page as a part of the
    custom view, or if I set it up as another custom view which is a
    subview of the larger view.

    But which is the better approach? I will want to work at two scales at
    all times: the scale on the page and the scale on the custom view.
    Will a subview make that easier?

    If I do use a subview, then what should my philosophy be for
    communicating among objects? I *think* that the NSDocument should
    manage both views. If the user resizes the window, that will resize
    the frame of the custom view. That will send a notification to the
    NSDocument which will make the appropriate changes to both views
    (scaling, bounds, whatever). Or is there a better way?
previous month march 2008 next month
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Go to today