Показать сообщение отдельно
Старый 12.08.2011, 11:20   #1  
Dark Smile is offline
Dark Smile
Junior AX Developer
 
16 / 10 (1) +
Регистрация: 17.06.2011
MorphX Version Control get stored Element
Hey there,

i save the whole AOT in MorphX Version Control and we call this e.g. Version1.
Now i change an element in the AOT in the normal way and save this.

While saving the system runs through the class SysVersionControlSystemMorphX.commandSave().

In this Method i added the following code to get a TreeNode Object of the changed Element:

...
treeNode = new TreeNode();
yavMonitorClass = new YAVMonitorClass();
// remove layer name to get path for init TreeNode:
tmp = this.itemPath(_controllable);
path = strdel(tmp, 0, 4);
treeNode = TreeNode::findNode(path);
if(treeNode)
{
info(strfmt("TreeNode: %1, Id: %2, Type: %3", treeNode.AOTname(), treeNode.applObjectId(), treeNode.applObjectType() ));
yavMonitorClass.writeToTable(treeNode, treeNode.applObjectType(),false, YAVMonitorAction::Edited); //my own class to save this
}
...

so now i have the information of which object the developer changed / created.
Now i want to know what he exactly changed on the object.

i want to compare a changed AOT Object against the Version1 of this Object stored in Version Control.

But how can i get the object from Version Control (= the Version1) ?


Thanks for answering and a nice weekend,
Robin
__________________
Kind Regards
Robin