I got some problems with that in an integrated mapping application. I solve
it
by declaring the winid as a Long. But I am not sure how to solve the
"overflow" error in mapbasic.
But iam pretty sure that the problem is related to the winid variable...
Emmanuel Par�
GIS/Programming for DBX Geomatics
email:[EMAIL PROTECTED]
http://www.linux-mandrake.com
-----Original Message-----
From: Humphrey, Ben <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: 16 septembre, 1999 17:26
Subject: MI Overflow error on custom select tool
>Howdy-
>
>I am getting an Overflow error withing mapinfo when I use my tool at this
>line:
>
>t_name = TableInfo(win_id,TAB_INFO_NAME)
>
>The point is to be able to click anywhere on the active window, have the
>event handler select the polygon underneath the layer and then select all
>polygons which intersect that polygon. Suggestions, remedies?
>
>Thanks in advance to the code crackers out there
>
>-Ben
>
>Here's the code:
>
>Include "mapbasic.def"
>Include "icons.def"
>
>Declare Sub Main
>Declare Sub Neighbor
>
>Sub Main
> Alter ButtonPad "Tools"
> Add Separator
> Add ToolButton
> Drawmode DM_CUSTOM_POINT
> HelpMsg "Thematically shade all region neighbors"
> Calling Neighbor
> Icon MI_ICON_COMMUNICATION_6
> Cursor MI_CURSOR_CROSSHAIR
> Show
>End Sub
>
>Sub Neighbor
>
>Dim win_id As Integer
>Dim fx, fy As Float
>Dim t_name As String
>
>win_id = FrontWindow()
>t_name = TableInfo(win_id,TAB_INFO_NAME)
>fx = CommandInfo(CMD_INFO_X)
>fy = CommandInfo(CMD_INFO_Y)
>
>Select * From t_name
> Where obj Contains CreatePoint(fx, fy) into selection
>
>Select * from t_name where obj intersects any (select obj from selection)
>
>End Sub
>
>----------------------------------------------------------------------
>To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
>"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
>
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]