Debugging a WebObjects Application
PATH
WebObjects 4.0 Documentation >
WebObjects Developer's Guide
Table of Contents
Previous Section
Programming Pitfalls to Avoid
This section describes some things to look out for as you debug your application.
WebScript Programming Pitfalls
Because WebScript looks so much like Objective-C and C, it's easy to forget that WebScript isn't either of these languages. When you're debugging WebScript code, watch out for the following tricky spots:
NSString *string1, *string2;
// WRONG!
if (aString1 == aString2) ...
// Right
if ([aString1 isEqualToString:string2]) ...
The postincrement and postdecrement operators are not supported. If you use them, you won't receive an error message. Instead, they behave like preincrement and predecrement operators.
i = 0;
if (i++ < 1 )
// This code never gets executed.
For more information, see the chapter "The WebScript Language".
Table of Contents
Next Section