This is an example of the compiled code in U10, that is not used in U9.
Trigger <FSCR> from Field: CMDUPDATE.TB2_COPIE.CAL
[ 1] #ifundefined BreakInheritance_fld_TB2_P_DET
[ 7]****** entry lp_update
[ 8] variables
[ 9] string hvfunktie
[ 10] string hvmenu
[ 11] endvariables
[ 12] 1-1 if ($dbocc("WHENT") <= 0)
(LP_UPDATE) warning: 1000 - Entity 'WHENT' not found
[ 13] 2-1 return(-1)
[ 14] 3-1 endif
[ 15] 4 call lp_store
[ 16] 5 hvmenu = $$MENU_ITEMS
[ 17] 6 $$RUNFORM = "WENTU00"
[ 18] 7 call X_MWKCHECK ; alleen uitvoeren als maatwerk is toegestaan
[ 19] 8 hvfunktie = ""
[ 20] 9 $2 = 0
A lot of these extra lines are compiled, all under the same '#ifundefined BreakInheritance_fld_TB2_P_DET'
This code exists in the main entity (which is called TB2), however this code is only used (and modified) when the accompanying button (CMDUPDATE in this case) is painted on the component.
I don't see any #define BreakInheritance_fld_TB2_P_DET' line.
I hope this is enough to determine my problem
------------------------------
Wim Van Wijngaarden
CAL Consult Gmbh
------------------------------
Original Message:
Sent: 12-20-2022 10:19
From: Michael Taylor
Subject: Functional subtypes after migrating from Uniface-9 to Uniface-10.
Hi Wim,
Uniface 10 increases the granularity of inheritance from container to module, and these defines are to reinstate how v9 did it. To understand how they work, you need to look at how the compiler works when compiling scripts. The relevant steps when compiling the component proc are to collect the script from all levels of the container's inheritance, with the most generic location first and the most specific last. An example result would be
Declarations; From D_BUTTONS; From D_BUTTONS2#define BreakInheritance_ent_D_BUTTONS_P_DUP#define BreakInheritance_ent_D_BUTTONS_P_GENERALCollection Script; From D_BUTTONS#ifundefined BreakInheritance_ent_D_BUTTONS_P_GENERAL entry lpEntryFrom_D_BUTTONS end#endif; From D_BUTTON2#ifundefined BreakInheritance_ent_D_BUTTONS2_P_GENERAL entry lpEntryFrom_D_BUTTONS end#endif
The precompiled is then processed, resolving all the #directives and removing the #ifundefined BreakInheritance_ent_D_BUTTONS_P_GENERAL block, as BreakInheritance_ent_D_BUTTONS_P_GENERAL is defined.
Declarations; From D_BUTTONS; From D_BUTTONS2#define BreakInheritance_ent_D_BUTTONS_P_DUP#define BreakInheritance_ent_D_BUTTONS_P_GENERALCollection Script; From D_BUTTON2#ifundefined BreakInheritance_ent_D_BUTTONS2_P_GENERAL entry lpEntryFrom_D_BUTTONS end#endif
The compiler will finally compile the result and save the component. If these defines were not present, the entry lpEntryFrom_D_BUTTONS would be included in v10 but not in v9.
I am not sure what the extra messages are. Do you have an example?
I hope this helps
Mike
------------------------------
Michael Taylor
Rocket Internal - All Brands
Original Message:
Sent: 12-19-2022 09:31
From: Wim Van Wijngaarden
Subject: Functional subtypes after migrating from Uniface-9 to Uniface-10.
I can't figure out what I see in functional subtypes after migrating from Uniface-9 to Uniface-10.
In the original entity D_BUTTONS I see:
Declarations
Collection Script
....
and before the entries:
#ifundefined BreakInheritance_ent_D_BUTTONS_P_GENERAL
In the subtype D_BUTTONS2 I see this:
Declarations
#define BreakInheritance_ent_D_BUTTONS_P_DUP
#define BreakInheritance_ent_D_BUTTONS_P_GENERAL
Collection Script
...
And before the entries:
#ifundefined BreakInheritance_ent_D_BUTTONS2_P_GENERAL (mind the '2')
I noticed that additional warning and errors are generated when compiling forms with functional subtypes in Uniface-10 for code that was not included in the same form in Uniface-9.
Can somebody smarter then me tell me what I'm doing wrong?
------------------------------
Wim Van Wijngaarden
CAL Consult Gmbh
------------------------------