Skip to Content

Unable to create Overwrite method due to typing of parameter

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Oct 21, 2016 at 04:24 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 22, 2016 at 03:45 PM

    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

    Add comment
    10|10000 characters needed characters exceeded