Skip to Content
0

Unable to create Overwrite method due to typing of parameter

Oct 21, 2016 at 03:47 PM

155

avatar image

Hi,

I am trying to create an overwrite method in an enhancement implementation. Unfortunately, one of the parameters is typed using a protected type of the enhanced class's superclass. Although I am able to access the private and protected sections of the class I am enhancing (through the core_object reference), it seems I cannot reference the protected section of its superclass as the enhancement is not strictly a subclass of the enhanced class.

Does anyone know a way round this? I am unable to get the overwrite method to activate even when it is empty.

Thanks,

Andrew

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Sandra Rossi Oct 21, 2016 at 04:24 PM
1

ouch, probably a "design flaw" - I don't see how you can overcome that issue using an Overwrite method, as your local implementation class should be made friend by the superclass too... I think the only solution is to use an implicit enhancement implementation instead of overwriting the method.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member
Dec 22, 2016 at 03:45 PM
1

Dear Andrew,

currently this situation is not supported in the enhancement framework for classes. We would have to support FRIEND-relationship as Enhancement too, but this is not yet implemented... Using the implicit enhancement point at the begin of a method is an alternative.

Best regards,

Eveline Crasovan

Share
10 |10000 characters needed characters left characters exceeded