cancel
Showing results for 
Search instead for 
Did you mean: 

How to add extra code in generated classes through application templates

Jesper Ronnholm
Associate III

The ability to package code into application templates is a great feature for preparing platform-specific projects, but it mainly seems to involve adding pre-existing files that are incorporated into the project skeleton. But is there any way to add additional code to the classes that are generated when a new TouchGFX project is created?

Say, for instance, that I wanted the screen-class to inherit from another base class (as a way of seamlessly extending the screen-class functionality) automatically at project creation. Is it possible to do this in the application template rather than having to do it for every new project?

This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Martin KJELDSEN
Chief III

There's no direct support for this. In your post-generate command (.touchgfx file) you could call a script to modify each generated file to inherit from another class.