NSWindow AutoSave

  • I have searched, read and implemented the suggestions found  but in no case can I get a non-resizeable window or panel to open in the last position it occupied.

    There must be some secret sauce, is anyone willing to share the recipe?

    -koko
  • It seems to me that indeed there are bugs in the AutoSave mechanism, but as I am not sure what you already tried I suggest reading this and then ask for more when needed:

    http://cocoadev.com/wiki/NSWindowFrameAutosizing

    Op 22 jun. 2012, om 18:10 heeft koko het volgende geschreven:

    > I have searched, read and implemented the suggestions found  but in no case can I get a non-resizeable window or panel to open in the last position it occupied.
    >
    > There must be some secret sauce, is anyone willing to share the recipe?
    >
    > -koko
  • I don't know that this is a secret recipe but it works for me when I include the following 2 lines of code in the awakeFromNib method of the NSview in the window...

      [[self window] setFrameUsingName: @"autosaveView"];
      [[self window] setFrameAutosaveName: @"autosaveView"];

    And I don't know that it's significant but in the init method for the same NSView I declare and initialize the standard defaults.

    On Jun 22, 2012, at 12:10 PM, koko wrote:

    > I have searched, read and implemented the suggestions found  but in no case can I get a non-resizeable window or panel to open in the last position it occupied.
    >
    > There must be some secret sauce, is anyone willing to share the recipe?
    >
    > -koko

    Charlie Dickman
    <3tothe4th...>
previous month june 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  
Go to today