Most like the reference to the class instance is lost.
You need to use the Delegate.create to define the call back
to onLoad.
I like to do that in the constructor.
You probably also want the class to provide call backs to the
code that will use the class.
Here is a mock-up of the code you could consider