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

Reply via email to