Page 1 of 1

Conflicting class & domain declarations: font

Posted: 3 Apr 2018 22:23
by Harrison Pratt
This is a minor syntax question that I think I asked before, but can't find the response or question in this this forum.

I have a class implementation with the following open declarations:

Code: Select all

    open core, vpi, list     open vpiDomains     open gdiplus, gdiplus_native, font
How can I keep predicate declarations from implying the wrong font type. The compiler assigns vpiDomains:font as the variable domain when the variable I want to pass is a font object from the font class, as in the sample declaration below:

Code: Select all

class predicates     drawDown : (pieCalc::pieSectorInfoDOM*, graphics, font, gdiplus::rectF).
One way around this issue is to omit the open vpiDomains statement and individually qualify references to the vpiDomain elements such as rct/4 etc.

However, I also think that Thomas posted a way to qualify font within the predicate declaration a while ago.

Re: Conflicting class & domain declarations: font

Posted: 3 Apr 2018 23:18
by Martin Meyer
Hello Harrison,

I have found two font interfaces in the pfc (of VIP 8 build 801). One is in the namespace gdi. If you mean this one, code it like

Code: Select all

class predicates     drawDown : (pieCalc::pieSectorInfoDOM*, graphics, gdi\font, gdiplus::rectF).
The other font interface is in no namespace. For that one you can declare the predicate in the way

Code: Select all

class predicates     drawDown : (pieCalc::pieSectorInfoDOM*, graphics, ::font, gdiplus::rectF).

Re: Conflicting class & domain declarations: font

Posted: 4 Apr 2018 3:31
by Harrison Pratt
Ahhh ... thanks, Martin!