Page 1 of 1

Problem with console::setLocation in vip 7.4

Posted: 30 Nov 2012 5:59
by Elena Efimova
Hello!

It does not work (32 bit).

Posted: 2 Dec 2012 13:15
by Thomas Linder Puls
Hi Elena. Thank you. We will look at the problem (in fact I think you have been contacted with a solution).

Posted: 2 Dec 2012 19:21
by Vitaly Markov
The simple solution:

1) Modification of the declaration in file console_native.cl:

Code: Select all

predicates setConsoleCursorPosition : (fileHandle ConsoleOutputHandle, unsigned CursorPosition) -> booleanInt Result language apicall.
2) Modification of the implementation in file console.pro:

Code: Select all

clauses         setLocation(coord(X, Y)) :-         CoordU = bit::mkUnsigned32(X, Y),         Result = setConsoleCursorPosition(console_api::getStdHandle(stdOutput_handle), CoordU),         if Result = b_false then             LastError = exception::getLastError(),             exception::raise_NativeCallException("SetConsoleCursorPosition", LastError, [])         end if.
Works perfectly.
I wish good luck.

Posted: 2 Dec 2012 19:45
by Elena Efimova
Thank you! The problem has been solved. :-)

Posted: 23 Jan 2013 14:12
by Thomas Linder Puls
This is solved in Visual Prolog 7.4 build 7401. To upgrade select Web -> Check for Updates in the IDE.