The problem lies within your custom factory class. You overwrote getView() but your getView() method doesn't return a delegate (you need to return a BehaviourDelegate or a subclass of it) but ViewLoop expects one.
For further questions I suggest you to use the official developer forum. There tend to be more active monkey-c developers than here.
You can also check out the "PrimatesApp" example shipped with the SDK. If you use VSCode, press F1 and type "monkey c: open samples folder". You can find the samples there.