Something mysterious about that. When I do a simple note of the value of commanfinfo(1) within the winclosedhandler, I get a real window handle (a full integer), not the internal MI id for non-document window (say 4 for graph). I am using MB 6.5
Jacques Paris -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 11-Jul-03 14:23 To: [EMAIL PROTECTED] Subject: Re: MI-L Working with WinClosedHandler Peter, I tried your suggestion, and it works, but with a twist. CommandInfo(CMD_INFO_WIN) is returning the wrong window number. After opening the browser, I get its window number, and set integer j to its value, 3. In WinClosedHandler, integer k is set to the value of CommandInfo(CMD_INFO_WIN), 4. I get the action I want when k = j+1: k = CommandInfo(CMD_INFO_WIN) If k = j+1 Then If TableInfo(Cities,TAB_INFO_EDITED) Then If Ask("Save changes to table Cities?","Save","Discard") Then Commit Table Cities Else Rollback Table Cities End If End If End If I thought CommandInfo(CMD_INFO_WIN) might be counting the Message Window, but when I close that first, and comment out all Print statements, I still get the miscount. My workaround works, but not knowing why, I do not know if I can trust it in all situations. Mike --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 7606 --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 7623
