xsharp.eu • warning XS9043
Page 1 of 1

warning XS9043

Posted: Fri Oct 02, 2020 2:20 pm
by vzeljko
I got these warnings:
warning XS9043: 'Font' is ambiguous. Could be NamedType 'System.Drawing.Font' or NamedType 'VO.Font'. Using the first one.( For Font.)
warning XS9043: 'Control' is ambiguous. Could be NamedType 'System.Windows.Forms.Control' or NamedType 'VO.Control'. Using the first one. (For TextBoxKeyUp)
I understand the meaning of warnings but what should I do to avoid these warnings.
Zeljko

warning XS9043

Posted: Fri Oct 02, 2020 2:44 pm
by robert
Zeljko,

Apparently you are mixing VO UI and Windows Forms UI.
To prevent the error you can use fully qualified typenames:

Code: Select all

VO.Control
or

Code: Select all

System.Windows.Forms.Control
Alternatively you also can set an alias:

Code: Select all

USING SWF := System.Windows.Forms
and then use this alias to specify

Code: Select all

SWF.Control


Robert

warning XS9043

Posted: Fri Oct 02, 2020 4:59 pm
by vzeljko
I use winforms in VO dialect.
Changing Control to System.Windows.Forms.Control // (SELF:SelectNextControl((System.Windows.Forms.Control)sender, TRUE, TRUE, TRUE, TRUE )
and Font to System.Drawing.Font // oFont := System.Drawing.Font{cFontName,9.5,FontStyle.Regular}
problem solved.
Thanks Robert.
Zeljko

warning XS9043

Posted: Fri Oct 02, 2020 7:53 pm
by Chris
HI Zeljko,

The error message tells us that you have a reference to the library VOGUIClasses in your project. This library is used for creating "VO-style" windows and controls. If you do not need that and you are only using WinForms forms and controls, then you can remove this reference and then there will not be any such conflict anymore.

warning XS9043

Posted: Fri Oct 02, 2020 9:04 pm
by vzeljko
Hi Chris,
when I remove reference to the library VOGUIClasses, then I get error when I call ReportPro classes.

Zeljko

warning XS9043

Posted: Fri Oct 02, 2020 9:41 pm
by Chris
Hi Zeljko,

Ah, OK, ReportPro uses the VOGUI classes, so that's why you needed them, understood!