mAHandler gets its value from objectB.mAnotherHandler, which in turn gets its
value from objC.mYetAnother, and so on down the line. Something at the end of
the call chain is supposed to return a value. But, because of an exponential
number of branches, you can't be sure you'll eventually get a return. You
gotta check for voidP then.
Of course. That's the reason to have a void test. Beats the tar out of C, which can give you garbage. But testing for void is not at all the same thing as saying
thisVar = void
...which is not, to me, good design. It makes more sense to do this:
thisVar = #null
...which still gives you a testable value and occupies the same amount of memory, time, etc. In your example if the var in question begins with that value before the cascade failure you describe, it stands a better chance of still ending up with a testable value that doesn't indicate program (prorgammer) error.
As a bonus if it *does* return a void at the end of it all, you have a much better chance of finding where it happens by stepping through the code and seeing where its value stops being #null and starts being void.
Setting vars to void on purpose makes absolutely no sense to me. It never has and it probably never will. Void means "I haven't even been touched by code yet, so don't use me", while some other value (0 pr #null or "") means *something* has manipulated the variable and the person who wrote the code stands a reasonable chance of knowing what its value is (or should be) from line to line in the code that handles it. That implies a programmer who knows what his code is purportedly doing at all times, and it's the kind of person I'd be more likely to want working on a project.
Warren Ockrassa | President, nightwares LLC [EMAIL PROTECTED] nightwares LLC | Consulting Programming http://www.nightwares.com/ Author | Director 8.5 Shockwave Studio: A Beginner's Guide Chapter samples | http://www.nightwares.com/director_beginners_guide/
[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
