Re: can update the UI from sheetDidEnd:…. ?
Re: can update the UI from sheetDidEnd:…. ?
- Subject: Re: can update the UI from sheetDidEnd:…. ?
- From: Andy Lee <email@hidden>
- Date: Wed, 23 Jan 2013 22:33:46 -0500
On Jan 23, 2013, at 9:30 PM, Nick Rogers <email@hidden> wrote:
> I was updating a few textfields from my sheetDidEnd:…. method.
> Just wondering if that was causing the crash (UI related error in main thread).
What happens if you *don't* update the text fields in your sheetDidEnd method? Does it still crash?
Can you show us the code for the sheetDidEnd method just in case there's a clue there?
Are you passing a contextInfo pointer to the sheetDidEnd message? If it's an object reference, maybe you need to retain it (and then autorelease it in sheetDidEnd), assuming you're not using ARC.
Are you using ARC?
Are you remembering to call orderOut: as mentioned in the Sheet Programming Guide (unlikely to cause a crash, but worth checking)?
<https://developer.apple.com/library/mac/#documentation/cocoa/conceptual/sheets/Tasks/UsingCustomSheets.html#//apple_ref/doc/uid/20001290-BABFIBIA>
Are the text fields in question *on* the sheet? If so, maybe you're trying to modify them after they've been dealloc'ed due to the sheet being dismissed.
Does the stack trace show any of your code, or is it all Apple stuff?
Are there any meaningful error messages being logged?
Are you actually crashing or just throwing an exception? What if you add a breakpoint exception?
--Andy
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden