Hi Mike, I'm wondering whether the CommandInfo return values may somehow be stacked, so that e.g. the X and Y values of a custom tool click hasn't been fetched before the WinClosedHandler is trying to fetch it's CommandInfo (Window ID) return value ? Exactly what's triggering the window closure in your app ?
One should always be wary when event handlers are involved, and curious things may happen if one's unlucky. This looks like a likely candidate for that list. Or it might be a v7 bug !???? Best regards/Med venlig hilsen Lars V. Nielsen GisPro, Denmark http://www.gispro.dk/ http://hjem.get2net.dk/lars-online/ WGS84: 10.20'40"E 55.20'20"N > -----Original Message----- > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > Sent: 21-01-03 23:29 > Subject: MI-L CommandInfo(CMD_INFO_WIN) Returning X, not ID > > The code below in MIPro 7 is intended to unselect the selection when the > user > closes certain browser windows, according to the browser window's name. > > But the CommandInfo( CMD_INFO_WIN ) returns numbers like -121.434 or > -97.0102, which are the X of the point in the map window the user picked > for > the radius select tool that created the browser's selection. Shouldn't > it > return the browser window id integer? CommandInfo( CMD_INFO_WIN_X ) > returns > the map's X like it should. > > Mike > ''''''''''''''''''''''''''''''''''''''' > Sub WinClosedHandler > Dim iWinID > iWinID = CommandInfo( CMD_INFO_WIN ) > If Left$(WindowInfo(WIN_INFO_NAME, WindowID(iWinID0), 21) = "Points > within Radius " > Run Menu Command M_QUERY_UNSELECT > Run Menu Command M_WINDOW_REDRAW > End If > End Sub > ''''''''''''''''''''''''''''''''''''''''''' > > --------------------------------------------------------------------- > List hosting provided by Directions Magazine | www.directionsmag.com | > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > Message number: 5059 > > --------------------------------------------------------------------- > List hosting provided by Directions Magazine | www.directionsmag.com | > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > Message number: 5069 > > --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 5079
