Am 28.02.2008 um 23:17 schrieb Quincey Morris <[EMAIL PROTECTED]>:

On Feb 28, 2008, at 12:25, Mike Fischer wrote:

OK, nobody answered so I did a further test:
...
Then I relaunched the app, used the IBAction to remove the Auto Save
Name and quit the app again. The key was still there! So it's a bug
in AppKit/Cocoa it seems. NSWindow -removeFrameUsingName: does
nothing at all AFAICT.

Well this time I got interested enough to go read the NSWindow class
reference for removeFrameUsingName. It doesn't say that this method is
supposed to remove the key from the preferences. It *seems* to say
that it leaves the key but removes the frame data (in the sense of
setObject: @"" forKey: windowAutosaveName, it looks like, but I'm
guessing).

You didn't say whether you saw any non-blank saved frame data
associated with the key after using removeFrameUsingName.

Sorry, somehow I seem to have missed your answer in Febuary and happend to find it today. (I read this list as digests which may have contributed to my missing your post.)

No, the content of the key in the preferenes file does not change at all and the window will use the saved data the next time the app is launched. As I wrote in Febuary, the method does not seem to do anything at all. It does not even work if I close the window before calling removeFrameUsingName: like this:

- (IBAction)handleDeleteAutosaveFrame:(id)sender
{
    NSString    *s = [fWindow frameAutosaveName];

// At this point s contains the string "w1" which is the Auto Save Name I set for the window in IB.
    if ([s length] > 0) {
        [fWindow setFrameAutosaveName:@""];
[fWindow close]; // The window has its "Release when closed" attribute set in IB so it should release at this point.
        [NSWindow removeFrameUsingName:s];
    }
}

I just verified these results on Mac OS X 10.4.11 (PPC) as well as on 10.5.3 (Intel).


My Bug came back as a duplicate of <rdar://4785592>


Mike
--
Mike Fischer         Softwareentwicklung, EDV-Beratung
                                    Schulung, Vertrieb
Web: <http://homepage.mac.com/mike_fischer/index.html>
Note:                 I read this list in digest mode!
          Send me a private copy for faster responses.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to