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.

234 Spanish Town Road

Kingston 11, Jamaica, W.I.

 

Phone:  (876) - 923 - 6141 Ext. 2400, 2412
Fax:      (876) - 923 - 5372

Cell:      (876) - 3833566
Email:   [EMAIL PROTECTED]

            [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
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to