window vs vpiDomains::windowHandle type difference.

Discussions related to Visual Prolog
daveplummermd
VIP Member
Posts: 88
Joined: 18 Jul 2006 17:18

window vs vpiDomains::windowHandle type difference.

Unread post by daveplummermd » 17 May 2012 18:28

Guys

What is wrong with this code:

Code: Select all

 onShow(Source, _CreationData):-         vpi::winMove (Source,  rct(0,0,200,200) ) ,
On compilation it states:
TaskWindow\TaskWindow.pro(36,23) error c504: The expression has type '::window', which is incompatible with the type 'vpiDomains::windowHandle'
I am bumping all over help file without luck. What is relation between types? Where can I read on this?

Thanks in advance
Dave Plummer

User avatar
Thomas Linder Puls
VIP Member
Posts: 1625
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls » 17 May 2012 22:51

There are two partly seperate GUI systems, the "old" in pfc\vpi and the "new" in pfc\gui.

pfc\vpi windows are represented by handles (vpiDomains::windowHandle), whereas windows in pfc\gui are objects (window).

Source is a window, so it cannot (and should not) be used with vpi.

vpi::winMove moves the window by defining where the outer rectangle should be in pixels.

On a window the same operation is performed by the setOuterRect predicate:

Code: Select all

onShow(Source, _CreationData):-         Source:setOuterRect(rct(0,0,200,200)),
Regards Thomas Linder Puls
PDC

daveplummermd
VIP Member
Posts: 88
Joined: 18 Jul 2006 17:18

Unread post by daveplummermd » 18 May 2012 14:06

Thanks for reply.
I am studying the differences now.

dave plummer
Dave Plummer

Post Reply