Page 1 of 1

WM_BLOCK and QLIB

Posted: Fri Sep 27, 2013 12:18 pm
by JonS
The follow code works okay is SBASIC

MWINDOW#menuc%,3! : REMark Set window area over info window 3
WM_BLOCK#menuc%,20,4,0,0,4

When compiled with QLIB it fails with 'invalid parameter'. The information window is 652x4, so the block will fit in it.

Is there some sort of compatibility issue with WM_BLOCK and QLIB?

Running on QPCII V4, QLIB3.35

Re: WM_BLOCK and QLIB

Posted: Fri Sep 27, 2013 4:17 pm
by tofro
You have not explicitely stated that it works under the interpreter, which I just guess it does.

Have you checked the run-time value of 'menuc%'?

EasyPtr would typically come back with a negative number (most probably "not found", if the Info window is not in your menu definition.

If some other EasyMenu call before had failed, it could also be that menuc% got a negative value there - It doesn't necessarily need to be in this context.

For QLib, I seem to recall that in some versions it didn't correctly pick up "special" delimiters (like the "!") at the end of line.

Try and change that line to

Code: Select all

MWINDOW #x%,3!\0
(EDIT: Just realized it's even in the manual: "7.5 Commands WARNING")

That could help.

Tobias

Re: WM_BLOCK and QLIB

Posted: Fri Sep 27, 2013 6:05 pm
by dilwyn
It's also mentioned in Easyptr manual, part 2 page 99 in the version I have (section 11.5). If the parameters list ends with a separator, a 'dummy' last parameter is needed, hence the suggestion to add a dummy parameter such as \0 to the end of a command.

Re: WM_BLOCK and QLIB

Posted: Fri Sep 27, 2013 6:13 pm
by JonS
It's not the dummy parameter, as I have tried that...I think the menuc% variable must be getting corrupted as suggested....will continue investigating.

Thanks