· Jul 18, 2017

Trigger a class compilation

Hi all,

I was wondering if there is any way to trigger the compilation of a class based on the compilation of another (unrelated) class. For example:

Class 1 = test.class

Class 2 =

Class 3 = test.class.type.two

Every time class 2 or class 3 is compiled in Studio I would like to have class 1 automatically compiled as well.

The reason I need this is because class 1 has a method with CodeMode set to objectgenerator which generates some code based on what is found in classes 2 and 3.

Discussion (8)0
Log in or sign up to continue

I believe the preferred option is the DependsOn class keyword.  We use this often in DeepSee, because whenever you recompile the base class on which you base your cube, you should also recompile the cube class. So the cube class  looks like this, for example:

Class DeepSee.Model.PatientsCube Extends %DeepSee.CubeDefinition [ DependsOn = DeepSee.Study.Patient ]