Tags » Breakpoint

Remove breakpoint in X++ code

Removing the hardcoded breakpoint in Classes/Methods:

void breakpointRemoving(Args _args)
{
#AOT Name name;
NumberOf recordCount;
TreeNode treeNode,treeNode1;
SysDictClass sysDictClass;
str code;
str string;
TextBuffer textBuffer;
string = "breakpoint;";

textBuffer = new TextBuffer();

treeNode = TreeNode::findNode(#ClassesPath);
treeNode = treeNode.AOTfirstChild();

while(treeNode)
{
treeNode1 = treeNode;
//Class got selected
treeNode = treeNode.AOTfirstChild();

while (treeNode)
{
//Saving the code to str;
code = treeNode.AOTgetSource();

//Saving the code to textBuffer
textBuffer.setText(code);

if(textBuffer.find(string))
{
//Replacing the string with the one space
textBuffer.replace(string," ");

//Saving the updated code from textBuffer to treenode
treeNode.AOTsetSource(textBuffer.getText());

//Saving & Compiling the updated code from treenode to AOT
treeNode.AOTsave();
treeNode.AOTcompile();
}

//Saving the methods/class
treeNode1.AOTsave();

//Moving to next method
treeNode = treeNode.AOTnextSibling();
}

//Moving to next class
treeNode = treeNode1.AOTnextSibling();
}

}

Ax2012

Works in Progress—Horror Short Title Reveal

Following the new regime on the old blog here of posting every two weeks (see “Write More, Blog Less), I’m back. The good news is that I’ve been really productive in the last couple of weeks and my fiction writing has moved forward on all fronts. 278 more words

Writing