Page 1 of 1

window vs vpiDomains::windowHandle type difference.

Posted: 17 May 2012 18:28
by daveplummermd
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

Posted: 17 May 2012 22:51
by Thomas Linder Puls
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)),

Posted: 18 May 2012 14:06
by daveplummermd
Thanks for reply.
I am studying the differences now.

dave plummer