Hi,

Please try this one.
//how to add line to a class method at runtime
static void Job4(Args _args)
{
    #AOT
    TreeNode  treeNode;
    str oldSource;
    str newSource;
    int startpos;
    ;
    TreeNode = TreeNode::findNode(#ClassesPath
+'\\test');
    treenode = treenode.AOTfindChild("testing");
    oldSource = treenode.AOTgetSource();
    startpos = strfind(oldSource, '{', 1,
strlen(oldSource));
    newSource = strIns(oldSource, "//manoj chhillar",
startpos + 1);
    treenode.AOTsetSource(newSource);
    treenode.AOTcompile();
    treenode.AOTsave();
}

Manoj.

--- [EMAIL PROTECTED] wrote:

> Hi all,
>
> i got solution for editing method without opening a
> class. but, i want to
> add lines in a particular line in the class method.
> now, it is added in the
> first line of the method. if anyone know the
> solution, pls. tell me. thank
> u.
>
>
>
> regs,
> Hema. S
>
>
>


MANOJ CHHILLAR
9810544205

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com




Sharing the knowledge on Axapta.
Visit www.frappr.com/axapta for axapta friends.




SPONSORED LINKS
Business finance course Business to business finance Small business finance
Business finance consultant Business finance magazine Business finance schools


YAHOO! GROUPS LINKS




Reply via email to