Hi, I am writing an utility which needs to open a panel to browse files and select one.
- (IBAction)browseClicked:(id)sender { NSOpenPanel *panel = [NSOpenPanel openPanel]; if ([panel runModal]) { NSArray *filenames = [panel filenames]; NSString *filename = [filenames objectAtIndex:0]; if (filename){ printf("\n browseClicked: filename = %s \n", [filename cString]); if ([appToOpenText stringValue] != NULL ){ [appToOpenText setStringValue: filename]; } else printf("\n browseClicked: appToOpenText has NULL value \n"); } else printf ("\n *** browseClicked: Filename is NULL *** \n"); } } The filename chosen is assigned to the textfield. I have used defaults to synchronize this filename and storing it in a pList file. [_defaults setObject: [appToOpenText stringValue] forKey: @"AppToOpen" ]; [_defaults synchronize]; But whenever I click Browse plIst file is automatically updated with the following junk values What could be the possible reasons to this problem, please help. Thanks, Sparta... _______________________________________________ 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]