I think what you did was to create a handle to the object but you did not create an instance of the object that the handle points to.
Since the class name is xx the handle you created, which is A, would require the following declaration statement:
xx A;
You then need to point the handle to an instance of the object as follows:
A = new xx();
Or you could have done it all in one statement as follows:
xx A = new xx();
You may now use the handle to access the object by calling the object's methods.
Varden Morris
J. Wray & Nephew Ltd. - Group I.S.
Phone: (876) - 923 - 6141 Ext. 2400, 2412
Fax: (876) - 923 - 5372
Cell: (876) - 3833566
Email: [EMAIL PROTECTED]
affekatz <[EMAIL PROTECTED]> wrote:
I have now made a simpel class just to try and use the functionality
in axapta but when i call it from product builder it just says object
xx is not initialized. The example is placed here under:
[Class]
public class xx
{
int x;
int y;
}
[Method]
public void Xmethod(int a, int b)
{
x=a; //Initializing here i suppose
y=b;
int c;
c=x+y;
}
[method 2]
int Omethod()
{
return c;
}
i assume that i can call the method in product builder as this ( i
made a class variable named A):
A.Xmethod(4,5);
and by calling method 2 you would get the answer:
Answer = A.Omethod();
Can any one help ?
Sharing the knowledge on Axapta.
Do you Yahoo!?
Check out the new Yahoo! Front Page. www.yahoo.com
Sharing the knowledge on Axapta.
Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/Axapta-Knowledge-Village/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.