User |
Post |
6:17 am
October 29, 2008
|
colour me brad
Noob
|
|
Halifax, NS, Canada
|
|
|
posts 3
|
|
|
Hi all, I'm just getting started on iPhone dev (this blog's Todo List tutorial was a major step forward for me). One question I have is, what kinds of approaches people are having regarding error reporting. The tutorial uses NSAssert1 calls, but they just blow up the app in the simulator, so I'm digging in to try to come up with a real error reporting mechanism. The first vague idea I have is to have a separate view that displays the error and when an error occurs I load that view and switch to it. Does that make sense?
cheers,
Brad
|
|
7:00 am
October 29, 2008
|
colour me brad
Noob
|
|
Halifax, NS, Canada
|
|
|
posts 3
|
|
|
Managed to find it on my own (or at least one way of doing it). UIAlertView is a modal 'message box' that will work nicely for my purposes
brad
|
|
8:51 am
October 29, 2008
|
jab2109
iCoder
|
|
|
|
|
posts 8
|
|
|
When you use NSAssert you don't really want to tell the user there was a problem. The point of the Assert mechanism is to tell the programmer that something went wrong that shouldn't have, like a database query failing. UIAlertView should be used to ask the user a question, such as “Would you really like to go back? YES/NO”. It should not really be used for handling errors in your code.
|
|
11:34 am
October 29, 2008
|
colour me brad
Noob
|
|
Halifax, NS, Canada
|
|
|
posts 3
|
|
|
Ok, so how would you go about telling them of an error?
|
|