On 2 May 2012, at 09:55, Norman Dunbar wrote: > > When setting up a window, how do I set a couple of the loose items to > unavailable? I know how to do it in the working definition after the window > has been set up, but I think I need to do it in the status area before I call > WM_SETUP? If so, what's the offset for the loose items into that area as > opposed to the working definition? Or are they the same? I can't find > anything in the QPTR docs. >
If you use SETW to set the window you will find that the area for the status block and the loose item block immediately following are defined by wst ds.b <the number of bytes> The status area is $40 bytes long so that the loose item status block starts at wst + $40. Since the combined block is defined by ds,b there is no guarantee that all the values are zero. For that reason in my examples I clear the whole area thus setting all loose items to available. This clearing is done before the working definition is set up. To set a loose item to unavailable you just have to set the appropriate byte to $10. George _______________________________________________ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm