2008 Jul 22 8:41 AM
Hi Experts,
In some of the methods of the class, the parameters have input type as DATA or ANY. What does this mean? and how do I access these methods?
More over if I am in a method of class Z1 and I want to access the instance methods of class Z2. How can I do so?
Warm Regards,
Abdullah.
2008 Jul 22 8:46 AM
Hi Abdullah,
any - Any data type (suitable for any type)
any table - Internal table of any table type
You can access the methods of another class thru Inheritance.
Regards,
Sai
Hi Abdullah,
any - Any data type (suitable for any type)
any table - Internal table of any table type
You can access the methods of another class thru Inheritance.
Regards,
Sai
2008 Jul 22 8:46 AM
Hi Abdullah,
any - Any data type (suitable for any type)
any table - Internal table of any table type
You can access the methods of another class thru Inheritance.
Regards,
Sai
2008 Jul 22 8:50 AM
>
> Hi Experts,
>
> In some of the methods of the class, the parameters have input type as DATA or ANY. What does this mean? and how do I access these methods?
>
> More over if I am in a method of class Z1 and I want to access the instance methods of class Z2. How can I do so?
>
> Warm Regards,
> Abdullah.
ANY means you can call the method with any data type. Whatever you choose.
For your second question, it depends on how Z1 and Z2 are related. If Z2 is not a subclass/superclass of Z1, then you simply instantiate a Z2 object, and call its methods as normal z2_ref->some_z2_method( ).
2008 Jul 22 8:55 AM
Hi Matthew,
I don't want to initialize this class. There is one instance already there. I am working in CRM Web UI View. I am in a method of a view context node. I want to access the attribute of the other context node of the same view. Depending on the values of that node I have to do process some data.
Warm Regards,
Abdullah
2008 Jul 22 9:24 AM
>
> Hi Matthew,
>
> I don't want to initialize this class. There is one instance already there. I am working in CRM Web UI View. I am in a method of a view context node. I want to access the attribute of the other context node of the same view. Depending on the values of that node I have to do process some data.
>
> Warm Regards,
> Abdullah
Hi Abdullah
I don't follow all the detail, but in terms of general OOP practice, I'll give it a shot:
You're in method of Z1, and you've an instance already of Z2. You want to access some attributes of Z2 from Z1. Are the attributes public or not. If they are, the answer is trivial. If not, then you have some options.
1. Add a public getter method to Z2 which returns the attribute. Then in Z1, do my_attr = z2->get_attr( ).
2. Define Z1 as a friend of Z2 in the class definition of Z2. This will allow Z1 to access the private attributes of Z2 directly.
Regards
matt
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |