2019-01-11 12:37 AM
When coupling the view and presenter classes with third-party, low-level code, you currently need to write new functions on every new class generated by the designer.
I'm not sure if it's possible through ATs, but is it possible to add those functions any other way so that the designer will add my code to every newly generated view class?
2019-01-11 12:59 AM
Hi @Jesper Rönnholm,
There's currently no way to do what you're asking: To append pre-written code to generated classes. Have you considered creating a base-view/presenter from which all these views that share common functionality inherit?
Best regards,
Martin
2019-01-11 04:18 AM
Yes, that was actually the original idea.
We tried to access the "handleKeyEvent" method in the ScreenViewBase class, but it's only defined if the screen in question actually have any interactions with the "Hardware button is clicked"-trigger.
Again, this is ultimately about abusing the "handleKeyEvent" to generate events in the designer. :grinning_face_with_sweat:
-Jesper