Hey, ive got into a problem, i need to have myself a method to compare a passed object to it (class, table, form…) with the sys layer of it, whats the way to do it ? (Not with the compare tool, i mean manual way, with x++). I tryed using SysCompare, Tutotorial_CompareContextProvider and so on, but didnt succed in any, maybe someone have some code snippet or example for it ? braings melting three days long allready >.<;
Yet too, ax is 2009.
I think SysCompare::silentCompare() and SysTreeNode::findNodeInLayer() is everything what you need.
Ive allready found out how to use these, nope, its not enough, i need information like how many lines of code have been changed in class between sys and for example var or usr layers, with these i only get boolean info, is there a difference or not… ive created my own class which extends SysCompare and overridden all the methods to public from protected, maybe there is a way to get some info in a container or anything about the changes itself between the object layers ? tryed nodeCompare, compareComparable methods, but they all return only is there a difference or not, not the difference itself. I need this info on creating alternatiev to upgrade estimation report tool.
Why didn’t you tell it at once?
I would iterate subnodes recursively, use SysCompateText for actual comparison and process its result by myself. The result is a container of code blocks - you’ll understand it when you try it.
Ok, i get an iterator over subnodes, i assign them to type TreeNode ar SysTreeNode variables, but SysCompareText requires strings for comparison… how is it possible, if i have for example a class method in a node variable, to have its code text ? .toString() gives me path or name of the method, not the code itself.
kinda not feeling comfortable with ax yet, only first three days of working with it…
dah, solved it, thanks for a guide line, ill ask more questions if i get into any probs.
SysTreeNode has hasSource() and AOTgetSource() method.
You’re not in a very simple area of AX, but I have already working implementation of these things (the normal AX compare). Cross-references and code traversing in debugger should be your best friends in this phase.
I have a similar requirement to understand the way we can compare AX objects Manually instaed of using Code Compare tool. Could you please help me how could you acheive this?
how solved it?