Forum breadcrumbs - You are here:WeLoveGod RallysPublic Forums: fbcocoaCrash when window is closed but O …
You need to log in to create posts and topics.
Crash when window is closed but OK when on normal Quit.
1,678 Posts
#1 · September 30, 2012, 10:31 pm
Quote from Forum Archives on September 30, 2012, 10:31 pmPosted by: fblistserve <fblistserve@...>
On Sep 30, 2012, at 7:09 PM, Brian S <[email protected]> wrote:
My main app delegate contains:-(void)doQuitHouseKeeping{// save selected tabview pane in preferencesNSUserDefaults *ud = [NSUserDefaults standardUserDefaults];[ud setInteger: [self getPaneLastUsed] forKey:kPaneLastUsedKey];// <<<<<<<<<<<< crashes here on window close[ud synchronize];}Apologies. I failed to post the called method which actually crashes. In case anyone is interested it is:
- (int) getPaneLastUsed{NSTabViewItem *item = [theTabView selectedTabViewItem]; <<<<< this Cocoa method is the actual crash point.if ( item != nil ){return [[item identifier] intValue];}else{return 0;}}Brian S.
To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Posted by: fblistserve <fblistserve@...>
On Sep 30, 2012, at 7:09 PM, Brian S <[email protected]> wrote:
My main app delegate contains:-(void)doQuitHouseKeeping{// save selected tabview pane in preferencesNSUserDefaults *ud = [NSUserDefaults standardUserDefaults];[ud setInteger: [self getPaneLastUsed] forKey:kPaneLastUsedKey];// <<<<<<<<<<<< crashes here on window close[ud synchronize];}
Apologies. I failed to post the called method which actually crashes. In case anyone is interested it is:
- (int) getPaneLastUsed
{
NSTabViewItem *item = [theTabView selectedTabViewItem]; <<<<< this Cocoa method is the actual crash point.
if ( item != nil )
{
return [[item identifier] intValue];
}
else
{
return 0;
}
}
Brian S.
To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Click for thumbs down.0Click for thumbs up.0