Dilwyn Jones wrote:
> The Easyptr manual is pretty scant on the subject, basically
> describing it as an MCALL with a couple of extra parameters in
> Easyptr's IMPORTANT_TXT file. It doesn't really give any examples
> showing to properly use it.
I did rewrite the MCALLT text in manual revision 1.01 (because the
whole subject was unclear to me, too!), but I'm not sure whether I
have released that yet.
> As far as I know, item=MCALLT(#ch%\event%,time%) times out after time%
> frames (50=1 second), and the event% parameter seems to be:
> bits0-7 set - allow termination of call by events listed in pt1/42
> (Do, ESC, F1 etc) as long as \ is used after #ch%
No, the "\" flag is ignored by MCALLT. The equivalent is setting
event% to 255 before calling MCALLT.
> bits 8-15 (although suggested to be upper nybble bits 12-15) allow
> smsq/e job events??? Since SMSQ/E allows 8 events but only 4 bits are
> available, if I'm correct it must be a hex value 0 to 7 in those 4
> bits???
bits 8-15 is quite right, i.e. 8 bits for 8 events.
> A timeout return seems to be indicated by item=-1280 (not sure of the
> significance of that number) and event% being returned unchanged in
> value if no 'event' occurred.
Yes, -1280 is the return value for both events and timeouts. As it was
therefore impossible to distinguish between a single event and a
timeout from 4.09 onwards event% is cleared if a timeout occurred,
i.e. return value = -1280 and event% = 0 indicates a timeout.
Why -1280? It's -$500 hex, so pretty much just an arbitrary round
hex number, I guess.
> Can anyone give a better explanation, or provide a few examples or
> documentation on the subject? Apart from the "bubble help" perhaps I
> don't really have any particular use in mind, just learnign more about
> it.
This is the current manual entry for MCALLT:
num = MCALLT ([#ch%,] event%, time% [, num1, stat1%[, ...]])
event% job and window event vector. Must be given as a name
time% timeout in 1/50th of a second after which MCALLT should return
num1 menu item number
stat1% new item status
0 set to available
1 set to selected
-1 set to unavailable
For the num1 and stat1% parameters, refer to the MCALL explanation.
Event% and time% are obligatory, i.e. they must be present. Event%
must be given as a name, not only as value, as the event which caused
the return will be returned in event%. Event% can be used to pass both
window events and job events to force a return. The job events are
masked into the upper byte of event%.
The function value will be -1280 if MCALLT returned because of an
event or timeout. In case of a timeout event% will be set to 0 (since
Basic extension 4.09).
event% = event to return
= win_events + job_events*256
time% = timeout to return
Note: if you want MCALLT to return on any event like MCALL with the
"\" separator then you have to set event% to 255 before calling
MCALLT!
Marcel
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm