Blitz (21/176)

From:David McMinn
Date:4 Jul 2001 at 12:32:09
Subject:Re: Guru 8000000b

Hi amorel

> I use this code and it gurus right at the first rtlockwindow command.

[snip]

> Dunno where I got it, statfuncs perhaps.

Yeah, I got the LockWindow{} and UnlockWindow{} functions from
StatsFuncs. I stuck those two functions in a program with your one and
then this bit at the bottom:

WBToScreen 0
Window 0,0,0,400,300,$100f,"ddd",-1,-1
NPrint aslfilerequest{"blah","","","",0,0}
While WaitEvent<>$200
Wend
End

And it didn't crash (that was under OS3.1). Are you able to run your
program with the debugger? I can't really see anything wrong in the code.

I can only guess that it might be something like a window has been closed
meaning you have no currently used window (although I'm not sure if this
can actually happen?). That would probably kick up an error because of
the "Used Window" call, or if it returns -1 (or something else weird) the
LockWindow peeking into that window would break.

Oh, another thing you might want to try is changing the AllocMem_ line in
the LockWindow function to be
lock.l=AllocMem_(SizeOf.Requester, #MEMF_PUBLIC|#MEMF_CLEAR)



|) /\ \/ ][ |) |\/| c |\/| ][ |\| |\| | dave@blitz-2000.co.uk
http://members.nbci.com/david_mcminn | ICQ=16827694
Specifications are for the weak and timid! - Klingon C++

---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie