Document Window Ignoring Size Settings

  • (10.7)  I have a small (but resizable) initial window that is the only one I
    want open on the main screen when the document is launched.  The app has
    numerous other document windows, one of which is normally full-screen on a
    second monitor.  If I quit (usually through xcode while debugging) and
    re-launch the program, the initial window appears on the second screen,
    enlarged even beyond that screen¹s dimensions.  It totally ignores the nib
    size and even an explicit size I give it when creating in
    makeWindowControllers.  This seems to be some kind of a ³feature² (a la MS)
    of 10.7  How can I stop this annoying behavior and always get the correct
    specified size, and on the main screen?

    I have another window that seems to also have an affinity for the second
    screen, but I managed to defeat that by explicit coding.
  • On 5/30/12 10:52 AM, Gordon Apple wrote:
    > (10.7)  I have a small (but resizable) initial window that is the only one I
    > want open on the main screen when the document is launched.  The app has
    > numerous other document windows, one of which is normally full-screen on a
    > second monitor.  If I quit (usually through xcode while debugging) and
    > re-launch the program, the initial window appears on the second screen,
    > enlarged even beyond that screen¹s dimensions.  It totally ignores the nib
    > size and even an explicit size I give it when creating in
    > makeWindowControllers.  This seems to be some kind of a ³feature² (a la MS)
    > of 10.7  How can I stop this annoying behavior and always get the correct
    > specified size, and on the main screen?
    >
    > I have another window that seems to also have an affinity for the second
    > screen, but I managed to defeat that by explicit coding.

    This sounds like it might be automatic window restoration intervening at
    an inopportune time.

    To test, try checking the "Launch application without state restoration"
    option in Edit Scheme->Run->Options.

    If this is indeed the problem and you want to change this behavior
    permanently, take a look at the NSWindow methods documented under
    "Handling Window Restoration" in the class reference.

    --
    Conrad Shultz

    Synthetiq Solutions
    www.synthetiqsolutions.com
  • hi-

    On May 30, 2012, at 1:52 PM, Gordon Apple wrote:

    > How can I stop this annoying behavior and always get the correct
    > specified size, and on the main screen?

    Maybe in the Xcode (IB) Window's Attributes inspector uncheck "Restorable".

    thanks!-

    -lance
  • Thanks.  That seems to have solved the immediate problem.  However, it
    doesn’t help me understand why this thing is getting confused about where
    its windows should be.  I looked at the "Handling Window Restoration"
    methods, but I think it will take awhile to figure out how to use them.

    On 5/30/12 1:27 PM, "Conrad Shultz" <conrad...> wrote:

    > On 5/30/12 10:52 AM, Gordon Apple wrote:
    >>> (10.7)  I have a small (but resizable) initial window that is the only one
    I
    >>> want open on the main screen when the document is launched.  The app has
    >>> numerous other document windows, one of which is normally full-screen on a
    >>> second monitor.  If I quit (usually through xcode while debugging) and
    >>> re-launch the program, the initial window appears on the second screen,
    >>> enlarged even beyond that screen¹s dimensions.  It totally ignores the nib
    >>> size and even an explicit size I give it when creating in
    >>> makeWindowControllers.  This seems to be some kind of a ³feature² (a la MS)
    >>> of 10.7  How can I stop this annoying behavior and always get the correct
    >>> specified size, and on the main screen?
    >>>
    >>> I have another window that seems to also have an affinity for the second
    >>> screen, but I managed to defeat that by explicit coding.
    >
    > This sounds like it might be automatic window restoration intervening at
    > an inopportune time.
    >
    > To test, try checking the "Launch application without state restoration"
    > option in Edit Scheme->Run->Options.
    >
    > If this is indeed the problem and you want to change this behavior
    > permanently, take a look at the NSWindow methods documented under
    > "Handling Window Restoration" in the class reference.
    >
previous month may 2012 next month
MTWTFSS
  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 31      
Go to today