13.07.2015 Views

Using Caché Studio - InterSystems Documentation

Using Caché Studio - InterSystems Documentation

Using Caché Studio - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

When enabled, if changes have been made to source code in one or more methods, only those methodsare compiled with Build > Compile. (Use Build > Rebuild All to override.) Any changes to the classinterface (properties, method signatures, etc.) or storage definition cause a full compilation.Incremental compilation is typically much faster than a full compilation and speeds up the process ofmaking incremental changes to methods (application logic) during development.Incremental compilation works as follows:1. The Class Compiler finds all methods whose implementation has changed, places their runtimecode into a new routine, such as MyApp.MyClass.5.INT, and compiles this routine.2. The Class Compiler then modifies the runtime class descriptor for the class to use the newimplementations of the compiled methods. When an application invokes one of these methods,the new code is dispatched to and executed.3. The rest of the class definition (compiled meta-information, storage information for persistentclasses, runtime SQL information is left unchanged. Note that the previous implementation of themodified methods remains in the runtime code but is not executed.When a full (non-incremental) compilation is performed, all of the extra routines containing incrementallycompiled methods are removed. Perform a full compilation on all classes before deploying anapplication to avoid having extra routines.3.5.2 Compilation and In-Use ClassesIf you attempt to compile a class that has currently open instances, the default <strong>Caché</strong> behavior is forthe compilation to fail and to generate error number 5368, the text of which is “Objects of class'' are instantiated in process(es).”To correct this problem, either:Renaming Class Definitions• Delete all instances of the class by invoking the KILL command on all open OREFs• In <strong>Studio</strong>, select Tools > Options dialog, Compiler, General Flags tab and check the Compile in-useclasses check box.3.6 Renaming Class DefinitionsOnce you have created a class definition you cannot change its name. You can perform the equivalentof this operation by creating a copy of the class with a new name as follows:1. Select Tools > Copy Class.2. Select the class you want to rename in the From field.<strong>Using</strong> <strong>Caché</strong> <strong>Studio</strong> 33

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!