WM_BLOCK and QLIB

Anything QL Software or Programming Related.
Post Reply
User avatar
JonS
Bent Pin Expansion Port
Posts: 76
Joined: Fri Nov 11, 2011 3:54 pm
Location: Cumbria

WM_BLOCK and QLIB

Post 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


User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: WM_BLOCK and QLIB

Post 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


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: WM_BLOCK and QLIB

Post 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.


User avatar
JonS
Bent Pin Expansion Port
Posts: 76
Joined: Fri Nov 11, 2011 3:54 pm
Location: Cumbria

Re: WM_BLOCK and QLIB

Post 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


Post Reply