[Gambas-user] Can one test for a null object?

richard terry rterry at ...1822...
Sun Mar 16 21:54:46 CET 2008


When I load a patients past history into my program I want to be able to get 
the total count to do something, but if there is nothing in the 
currentPatient.past_history collection, this line bombs:

 x = frmClinical.currentPatient.past_history.count 

and says 'null object'

I has various attempts to test this first, with no luck.

Any help appreciated.

Richard T




More information about the User mailing list