WISH: #includeinherited + #includedefault, allow multiple entry def.

Author: ulrichmerkel@web.de (ulrich-merkel)

These precompiler directives should allow additional coding without breaking inheritence.

#IncludeInherited
adds the inherited sourcecode (model,template) for this trigger and object (entity, field, form)

#IncludeDefault
adds the current default sourcecode for this trigger and object (entity, field, form)

To ease overwriting of entries, the compiler should IGNORE multiple entry definitions and just take the first one.
 

Success, Uli

=========== some info from Andrew Wilkins ===========

There is an undocumented directive '#default' which is the equivalent of
#include <$libraryName>:[c]default_<$triggerAbbr>

Effectively the compiler inserts a #default into any trigger which has no actual code in it
 

2 Comments

  1. I want it to work like this:

    On the level of operation/entry:
    1. Use what is defined in the default.
    2. If the same operation/entry is defined differently in the model, use that.
               (In case of entities/fields: First look in the supertype, override if something different is found in the subtype. )
    3. If the same operation/entry is defined differently in the component, use that.
     

    On the level of the basic trigger text:
    Same as above
     

    If this becomes the standard behaviour, you would only need compiler directives if you want to behave differently.


    Author: Theo Neeskens (tneeskens@itblockz.nl)
  2. Hi Theo,

    thanks for your addition to my wish.

    As you mentioned, we have a couple of inheritaence levels
    (you specified the subtype-supertype one).

    Overwriting and modifying "methods" is a very important
    part of the object oriented coding philosophy.
     

    Perhaps we should beef up this wish to specify contexts
    and the way we want uniface to react on that situation.

    As an example which is already implemented for operations on templates (???)
    If another operation is defined in a component template and a component based on the template
    the local one will supersede the template one, but all other operations from the template are passed to the compiler.

    If we take ObjectOriented coding as an example, we should talk about a "SUPER" keyword to
    activate the operation/entry along the inheritance line.

    Success, Uli


    Author: ulrich-merkel (ulrichmerkel@web.de)