warning XS9043

We encourage new members to introduce themselves here. Get to know one another and share your interests.
Post Reply
User avatar
vzeljko
Posts: 35
Joined: Wed Sep 28, 2016 8:02 pm

warning XS9043

Post 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
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

warning XS9043

Post 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
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
vzeljko
Posts: 35
Joined: Wed Sep 28, 2016 8:02 pm

warning XS9043

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

warning XS9043

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

XSharp Development Team
chris(at)xsharp.eu
User avatar
vzeljko
Posts: 35
Joined: Wed Sep 28, 2016 8:02 pm

warning XS9043

Post by vzeljko »

Hi Chris,
when I remove reference to the library VOGUIClasses, then I get error when I call ReportPro classes.

Zeljko
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

warning XS9043

Post by Chris »

Hi Zeljko,

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

XSharp Development Team
chris(at)xsharp.eu
Post Reply