thanks all.  now i just need to get my callbacks werking properly.
 
ash
 
-----Original Message-----
From: Ronald Louer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 19 December 2002 7:20 AM
To: [EMAIL PROTECTED]
Subject: MI-L Selecting last created object


Dear Ash,
 
automatically? You need mapbasic or the mapbasic window.
This is the syntax:
 
Dim i as integer
 
i = TableInfo(cosmetic1, 8)
Select * from cosmetic1 where rowid = i
 
Cosmetic1 is the cosmetic layer which belongs to the first map window.
You can have more cosmetic layers. To find out there's a function called
LayerInfo.
Look at the Mapbasic.def file in the mapbasic directory if you need more
information. Also look at the function itself in the mapbasic helpfile.
 
TableInfo is the function used to find out information about the objects in
a layer where the number 8 is the replacement for the number of rows in a
table (TAB_INFO_NROWS).
 
Hope this helps,
 
Ronald Louer 
 
 
-----Original Message-----
From: Jacques Paris [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 18 December 2002 11:43 PM
To: Simmonds, Ashley (PTB)
Subject: RE: MI-L Selecting last created object
 
The last created object in the cosmetic layer is in the last row of the
virtual table that is that layer. Hence, with the hypothesis that the mapper
with that cosmetic layer is frontwindow:
dim romax as integer
dim acosm as string
acosm=layerinfo(frontwindow(),0,1)
romax=tableinfo(acosm,8)
select * from acosm where rowid=romax
Jacques Paris
 
 
-----Original Message-----
From: Peter Horsb�ll M�ller [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 18 December 2002 10:35 PM
To: '[EMAIL PROTECTED]'
Subject: FW: MI-L Selecting last created object
 
 
Try this in a MapBasic application:
'****************************************
Include "MapBasic.def"
Declare Sub Main
Declare Sub WinChangedHandler
Declare Sub EndProg
Dim mnNumRowsCosmetic As Integer
Sub Main
Alter Menu ID 4
Add
"(-",
"End TestAutoSelect"
Calling EndProg
End Sub
Sub EndProg
End Program
End Sub
Sub WinChangedHandler
Dim szCosmetic As String,
nNumRows, nWID As Integer
nWID = CommandInfo(CMD_INFO_WIN)
If WindowINfo(nWID, WIN_INFO_TYPE) <> WIN_MAPPER Then
Exit Sub
End If 
szCosmetic = WindowInfo(nWID, WIN_INFO_TABLE)
nNumRows = TableInfo(szCosmetic, TAB_INFO_NROWS)
If nNumRows > mnNumRowsCosmetic Then
Select * From szCosmetic
Where ROWID = nNumRows
mnNumRowsCosmetic = nNumRows
End If
End Sub
'*****************************************
Peter Horsb�ll M�ller
GIS Developer
COWI A/S
Rug�rdsvej 55
DK 5000 Odense C 
 
 
-----Original Message-----
From: Simmonds, Ashley (PTB) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 18 December 2002 5:22 PM
To: 'Mapinfo List (E-mail)'
Subject: MI-L Selecting last created object
 
heya, 
 
when the user does a create point (on the cosmetic layer) how do i get MI to
automatically select that point?
 
gramercy
 
ash.

 

 
 
 
 
 
 
 

---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 4634

Reply via email to