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]