How to identify the class NilObjectException? Isn’t this a built-in class?
Tim
nil means you have a variable with class xy defined but not created an object.
var x as new Class1 is not nil
var y as Class1 it is nil / null
propertys from kind class/object are also by default nil
https://documentation.xojo.com/getting_started/debugging/exception_handling.html
https://documentation.xojo.com/api/language/nil.htmlObjectException
Yes, NilObjectException is a subclass of a RuntimeException.
You can identify it like this:
if MyObject isa NilObjectException then
One usual error is to declare a class and not instantiating it.
It raises such exception at some point when you try to use its nonexistent contents.
Var d As New Date
Messagebox d.LongDate // Works
Var d As Date // Just declared it and forgot to instantiate it
Messagebox d.LongDate // Nil exception
In a debug session you can find it.