<Inherited Pushbuttons in VOWindow-Editor

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
ArneOrtlinghaus
Posts: 412
Joined: Tue Nov 10, 2015 7:48 am
Location: Italy

<Inherited Pushbuttons in VOWindow-Editor

Post 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
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Inherited Pushbuttons in VOWindow-Editor

Post 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.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Inherited Pushbuttons in VOWindow-Editor

Post 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.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Inherited Pushbuttons in VOWindow-Editor

Post by wriedmann »

Hi Chris,
VO reads the cavowed.inf on every start of the Window Editor, so it is enough to replace it.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
FFF
Posts: 1580
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

Inherited Pushbuttons in VOWindow-Editor

Post by FFF »

In my cavowed..inf i have a section
[SupplementalFiles]
File00=MyVoWed1.ini
...
which points to "my" additons.
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Inherited Pushbuttons in VOWindow-Editor

Post 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...
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Inherited Pushbuttons in VOWindow-Editor

Post 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!
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
ArneOrtlinghaus
Posts: 412
Joined: Tue Nov 10, 2015 7:48 am
Location: Italy

<Inherited Pushbuttons in VOWindow-Editor

Post 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.
Post Reply