________________________________
From: Terry McDonnell
Sent: 10 June 2005 11:42
To: 'Christophe Brabant'
Subject: RE: MI-L The method I use to detect objects moved with mouse
Christophe
Merci. Malheureusement, dans l'attachment il n'y a que:
---------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 16772
----------------------------------------
:-)
Below I include my code. I took your hint about testing for the X/Y
change. I'm testing the code at the moment but I don't think it's quite
there yet.
The problem of the error message I solved. I realised when I got home
that I've never had any luck with setting fields to values directly from
the OBJ column. I've always had to first store the OBJ in a variable.
After that no problem.
------------------------------------
Sub SelChangedHandler
'____________________
' This is only used when moving stops and the STOP table is the current
' When move a stop, store its new graphic obj centroid X/Y in the E & N
fields
' ________________________
Dim loObj as Object,
lnRowID as SmallInt,
lnNewX, lnNewY as Float
lnRowID = CommandInfo( CMD_INFO_ROWID)
loObj = Stop.Obj
lnNewX = CentroidX( loObj)
lnNewY = CentroidY( loObj)
If lnNewX <> Stop.Eastings
Or lnNewY <> Stop.Northings then
Set CoordSys Table STOP
Update STOP
Set Northings = lnNewY,
Eastings = lnNewX,
Last_Udate = CurDate()
where RowID = lnRowID ' Change the N/E values to the new coords
in the OBJ, after the move
End If
End Sub
________________________________
From: Christophe Brabant [mailto:[EMAIL PROTECTED]
Sent: 10 June 2005 11:31
To: Terry McDonnell
Subject: MI-L The method I use to detect objects moved with mouse
The complete code as attachment....
This method works only for objects that are created by the appliaction
itself, because rowids must be stored when objects are created.
Let me know what you think about that.
Christophe