NilObjectException
From REALbasicWiki
| Overall article skill | ✭ |
| |||||
|---|---|---|---|---|---|
| Available on | | ||||
| General | |||||
| Superclass | RuntimeException | ||||
| Interfaces | none | ||||
| Constants | |||||
|
none | |||||
| Methods | |||||
|
none | |||||
| Properties | |||||
|
none | |||||
| Events | |||||
|
none | |||||
|
NOTE: You can get descriptions of the items above from the REALbasic documentation. | |||||
A NilObjectException is raised when an attempt is made to access a property or call a method using a nil object reference. Also, some framework classes raise a NilObjectException when a nil object is passed as a parameter.
[edit] Sample code
dim w as Window1 // w is reserved, but no window is yet created, so w = nil.
//
// w = new Window1
//uncomment the previous line (remove //) to avoid the NilObjectException
//
w.Show //a NilObjectException is raised when w.Show is executed.
