Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Usage of Method (Protected)

Former Member
0 Likes
494

Hello Every1,

I have method which is defined as 'PROTECTED' in a class. I need to use the same in my function module. So please let me know how to use it.

Best Regards,

Siva.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
453

Hello,

You can't use a protected method except from within the class itself, or within one of the subclasses. This means you can't use the method from within in a function module.

Regards,

John.

Hello Every1,

I have method which is defined as 'PROTECTED' in a class. I need to use the same in my function module. So please let me know how to use it.

Best Regards,

Siva.

2 REPLIES 2
Read only

Former Member
0 Likes
454

Hello,

You can't use a protected method except from within the class itself, or within one of the subclasses. This means you can't use the method from within in a function module.

Regards,

John.

Read only

Former Member
0 Likes
453

You will have to create a sub class of this class and create a public method which in turn calls the protected method. That is the only work around.

However, there is a reason, why its been protected.

What method of the which class you are trying to use, may be there is a work around.

Regards,

Ravi