Re: cascading windows in document architecture

  • > I have a small, relatively simple document based application that I
    > created using Xcode 2.4 and Interface Builder 2.5.4 on a Mac running
    > Tiger. Recently, I moved it to my new iMac running Leopard. On the
    > old Mac, document windows cascade, just as expect, but on my new Mac
    > running Leopard and Xcode 3.0 and Interface Builder 3.0, the
    > document windows no longer cascade.
    >
    > Apple's "Window Programming Guide for Cocoa" says " If you use the
    > Cocoa document architecture, you can use the NSWindowController
    > setShouldCascadeWindows: method to set whether the window, when it
    > is displayed, should cascade in relation to other document windows
    > (that is, have a slightly offset location so that the title bars of
    > previously displayed windows are still visible). The default is
    > true, so typically you have no additional work to perform." This
    > seems no longer to be the case.
    >
    > I'm reasonably certain that I've not changed anything that would
    > account for the difference (famous last words that I'm prepared to
    > eat, if necessary). Has anyone else noticed this behavior? Is there
    > a setting that I've missed/a fix that I can apply?
    >
    > Boyd
    >

    I got the same problem with an application of mine, that manages two
    different kinds of documents. The first type is normal text (plain,
    RTF or RTFD) and the window cascading works as expected with these
    documents. The other one is a custom type containing histograms of
    spectra. For this last type the window cascading doesn't work anymore
    since the upgrade to Leopard. I'm currently using Xcode 3.0 and the
    matching version of IB and I didn't modilfy the pertaining code.
    Unfortunately, I'm very busy now with my teaching duties, but I plan
    to investigate this conundrum ASAP.

    Andrea
  • Andrea,

    Thanks for the reply.  In my case, the that aren't cascading are all
    of the same kind, i.e. just very plain text files.  I've not yet
    figured out why this is happening, but perhaps someone will be able to
    point out something simple that we are overlooking.

    Boyd

    On Feb 25, 2008, at 1:51 AM, perego wrote:

    >> I have a small, relatively simple document based application that I
    >> created using Xcode 2.4 and Interface Builder 2.5.4 on a Mac
    >> running Tiger. Recently, I moved it to my new iMac running Leopard.
    >> On the old Mac, document windows cascade, just as expect, but on my
    >> new Mac running Leopard and Xcode 3.0 and Interface Builder 3.0,
    >> the document windows no longer cascade.
    >>
    >> Apple's "Window Programming Guide for Cocoa" says " If you use the
    >> Cocoa document architecture, you can use the NSWindowController
    >> setShouldCascadeWindows: method to set whether the window, when it
    >> is displayed, should cascade in relation to other document windows
    >> (that is, have a slightly offset location so that the title bars of
    >> previously displayed windows are still visible). The default is
    >> true, so typically you have no additional work to perform." This
    >> seems no longer to be the case.
    >>
    >> I'm reasonably certain that I've not changed anything that would
    >> account for the difference (famous last words that I'm prepared to
    >> eat, if necessary). Has anyone else noticed this behavior? Is there
    >> a setting that I've missed/a fix that I can apply?
    >>
    >> Boyd
    >>
    >
    > I got the same problem with an application of mine, that manages two
    > different kinds of documents. The first type is normal text (plain,
    > RTF or RTFD) and the window cascading works as expected with these
    > documents. The other one is a custom type containing histograms of
    > spectra. For this last type the window cascading doesn't work
    > anymore since the upgrade to Leopard. I'm currently using Xcode 3.0
    > and the matching version of IB and I didn't modilfy the pertaining
    > code. Unfortunately, I'm very busy now with my teaching duties, but
    > I plan to investigate this conundrum ASAP.
    >
    > Andrea
    >
  • On Feb 25, 2008, at 12:01, Boyd Collier wrote:

    > Andrea,
    >
    > Thanks for the reply.  In my case, the that aren't cascading are all
    > of the same kind, i.e. just very plain text files.  I've not yet
    > figured out why this is happening, but perhaps someone will be able
    > to point out something simple that we are overlooking.
    >
    > Boyd

    I had this problem as well. The fix for me was to not show the window
    during awakeFromNib, but rather let the window be cascaded and shown
    automatically. It seems that if the window is already visible before
    it has been cascaded, the cascading step is skipped.

    Hope this helps.

    -Jacob
  • On Mon, Feb 25, 2008 at 12:19 PM, Jacob Lukas
    <jlukas...> wrote:
    > I had this problem as well. The fix for me was to not show the window
    > during awakeFromNib, but rather let the window be cascaded and shown
    > automatically. It seems that if the window is already visible before
    > it has been cascaded, the cascading step is skipped.

    Similarly, I have found that things work better if you ensure "visible
    at launch" is unchecked for your document's window.
    NSWindowController will take care of displaying the window for you if
    it's appropriate, and seems to do a bit of thinking about what it
    does.

    --Kyle Sluder