xsharp.eu • <Inherited Pushbuttons in VOWindow-Editor
Page 1 of 1

<Inherited Pushbuttons in VOWindow-Editor

Posted: Tue Oct 20, 2020 3:35 pm
by ArneOrtlinghaus
We have pushbuttons and radiobuttons inherited from the VO-GUI-Buttons. We have added the definitions of these buttons to our Cavowed.inf file. The X#-Windows editor treats these controls as data controls having the prefix ODC instead of OCC. We often have self-written code that access these control variables. Is there a possibility that we can tell the Windows Editor which button controls have been overwritten? (it should be 3 controls I think)

Original code after converting
oCCpshColor := PshBase{SELF,ResourceID{TABWERKEEDIT_VO_PSHCOLOR,_GetInst()}}
Code after saving Windows-Editor-Result
oDCpshColor := PSHBASE{SELF , ResourceID{ TABWERKEEDIT_VO_PSHCOLOR , _GetInst() } }
CavoWED.zip
(10.92 KiB) Downloaded 59 times

Inherited Pushbuttons in VOWindow-Editor

Posted: Tue Oct 20, 2020 6:18 pm
by Chris
Hi Arne,

Thanks for the sample, I see the problem with code generation using "oDC" instead of "oCC". Will fix this and will send you an update tonight or tomorrow.

Inherited Pushbuttons in VOWindow-Editor

Posted: Wed Oct 21, 2020 7:18 am
by Chris
Hi Arne,

I see in your cavowed.inf you have:

[CONTROL:TEXTCONTROL:BUTTON:ChkBase]
...
[CONTROL:TEXTCONTROL:BUTTON:PshBase]
...
[CONTROL:TEXTCONTROL:BUTTON:RADIOBUTTON:RdbBase]

so while the RddBase control uses as base as expected the built-in RADIOBUTTON control, the ChkBase and PshBase controls use as base the generic BUTTON control class. Is this as intended? I would expect not, because this way the editor does not know how to paint the controls (it does not know that the PshBase control should be painted as a button). I would expect those definitions to be:

[CONTROL:TEXTCONTROL:BUTTON:CHECKBOX:ChkBase]
...
[CONTROL:TEXTCONTROL:BUTTON:PUSHBUTTON:PshBase]

The radio button definition seems ok, so it actually gets generated with "oCC" in my tests here. Are you sure you are getting "oDC" for it?

Btw, it's been a while since I last tried that, can someone remind me what I need to do in order to use the custom cavowed.inf file in VO? Replacing the file in the Bin folder did not seem to be enough.

Inherited Pushbuttons in VOWindow-Editor

Posted: Wed Oct 21, 2020 8:03 am
by wriedmann
Hi Chris,
VO reads the cavowed.inf on every start of the Window Editor, so it is enough to replace it.
Wolfgang

Inherited Pushbuttons in VOWindow-Editor

Posted: Wed Oct 21, 2020 8:04 am
by FFF
In my cavowed..inf i have a section
[SupplementalFiles]
File00=MyVoWed1.ini
...
which points to "my" additons.

Inherited Pushbuttons in VOWindow-Editor

Posted: Wed Oct 21, 2020 8:18 am
by Chris
Guys,

Oh, I was not seeing the controls in the palette, so I thought it was not being applied. But I can select the controls from Edit->Select from palette, with which I can add the new controls, thanks! And actually I can see the chkBase control being painted as a CheckBox! Now I am really puzzled how VO figures this out...

Inherited Pushbuttons in VOWindow-Editor

Posted: Wed Oct 21, 2020 9:06 am
by Chris
OK, I see what's missing regarding choosing oCC or oDC as a prefix, in cavowed.inf there's a setting "Type=CommandControl" for the non data controls, which was being ignored by the VO WED in X#. That's fixed now, Arne please check your email!

<Inherited Pushbuttons in VOWindow-Editor

Posted: Wed Oct 21, 2020 10:04 am
by ArneOrtlinghaus
Hi Chris,
thanks for the answer and thanks for the patch you sent to me. I did not test it for all 3 types of controls, but I will do it now.

It is true, that the Inheritance is not completely correct, I have done the changes more than 15 years ago. I will change it for XS to be correct.