use classBuild class
it will create a new class in axapta thru code.
u can try this.
static void createnewClass(Args _args)
{
ClassBuild newClassBuild;
ClassName className;
;
ClassName = "MyNewClass";
newClassBuild = new ClassBuild(ClassName);
newClassBuild.addMethod("method1", "void method1(){\n str hello;}");
newClassBuild.addMethod("method2", "void method2(){\n str helloworld;}");
newClassBuild.classNode().AOTcompile(1);
}
NOW,IF U WANT TO CHANGE METHOD U CAN JUST CHANGE THE CODE like newClassBuild.addMethod("method2", "void method2(){\n str madam;}");
now it will just overwrite the code existing in method2()..
sreenath Reddy
[EMAIL PROTECTED] wrote:
Hi,
how to add lines within the class method in a particular line without
opening the class?
Ex:
-----
i have a class called 'Class1'. it has more than one method like 'Method1',
'Method2', etc.
let us assume, Method2 has 5 lines of code. i want to add some lines before
the 4th line without opening the class method. through coding (ex: from
job), i want to add. How do i do this?
from job, i can open the specified line of code in the Method2 and i can
also change the source code of the Method2. but, entire existing code is
removed and new one is added. but. i want the specified line of code will
be appended with existing one.
pls. provide the solution. Thank u.
regs,
Hema. S
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
Visit your group "Axapta-Knowledge-Village" on the web.
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
Sreenath Reddy G
System Analyst,
Sonata Software Ltd.
1/4, APS Trust Building,
N. R. Colony, Bull Temple Road,
Bangalore-560019.
Mobile-+9886331041
---------------------------------
Yahoo! Mail goes everywhere you do. Get it on your phone.
[Non-text portions of this message have been removed]
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
- Visit your group "Axapta-Knowledge-Village" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.