On 10/28/2009 03:25 AM, Roland Plüss wrote:
- void showBacktrace( FILE* ):
This function is mentioned in the documentation at the website but does
not exist in gstpub.h . It sounds to me like this function could be used
to print out errors if there is a problem in the scripts somewhere, is
that right? Is this also one of the new functions not found in the
smalltalk version I have?
All of them are.
If not what is the preferred way to handle
errors? hijacking #doesNotUnderstand in the Object class ( including
#halt and company )?
Hijacking SystemExceptions.UnhandledException>>#defaultAction sounds better.
Even better would be to define #debuggerClass in the superclasses that
your scripts are supposed to subclass. The #debuggerClass will be sent
the class method #open:.
- testing for nil:
I want for example test if a given class exist. I do
gst_class_name_to_oop( "AppTest" ) for example. Now assuming the class
does not exist does this call return nilOOP? If so how do I properly
test for nilOOP? Using objectIsKindOf (OOP, OOP)? ( asking since in the
docs it's mentioned that IS_NIL macro is deprecated )
You can test "x == gst_interpreter_proxy.nilOOP". You can of course
define your own IS_NIL macro. However gst_class_name_to_oop returns
NULL (not nil) if the class is not found; I'll update the docs.
Paolo
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk