Discussions related to Visual Prolog
Harrison Pratt
VIP Member
Posts: 439
Joined: 5 Nov 2000 0:01

Conflicting class & domain declarations: font

Unread post 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.
Martin Meyer
VIP Member
Posts: 328
Joined: 14 Nov 2002 0:01

Re: Conflicting class & domain declarations: font

Unread post 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).
Regards Martin
Harrison Pratt
VIP Member
Posts: 439
Joined: 5 Nov 2000 0:01

Re: Conflicting class & domain declarations: font

Unread post by Harrison Pratt »

Ahhh ... thanks, Martin!
Post Reply