Hi Terry,

You may be hazzling with ambiguous names. MapBasic is notorious for first 
allowing name mixups, and then almost consistently picking
the wrong entity.

Do you by any chance also have an opened table, a column in another opened 
table, or a variable named "eastings" ?

Have you tried to split your update into three statements, one for each field, 
to see if it makes a difference ? Perhaps prompting a
change by swapping the order of updates ?

The entity "stop.eastings" referenced in your note$ puzzles me. Have you 
fetched the relevant row (fetch rec gnRowID from STOP)
before issuing the note$ ?

Your table names STOP may also conflict with the MapBasic statement "stop", 
although it really ought to yield a totally different
error message.

-------------

Normally in a SelChangedHandler it ought to be simplest to use (update) the 
current selection. I presume that you're trying to
update the coordinate values caused by a visually moved point object ? How 
about instead using:

    Update Selection Set  Northings = CentroidY(OBJ),   Eastings = 
CentroidX(OBJ),   Last_Udate = CurDate()

Best regards/Med venlig hilsen
Lars V. Nielsen
GisPro, Denmark
http://www.gispro.dk/

----- Original Message ----- 
From: "Terry McDonnell" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, June 09, 2005 7:03 PM
Subject: MI-L What's wrong with this code?


Can anyone see the problem with this code in my SelChangedHandler?:
_______________________________________
note "Eastings = " + str$(stop.eastings)
 Update STOP
  Set Northings = CentroidY( OBJ),
   Eastings = CentroidX( OBJ),
   Last_Udate = CurDate()
  where RowID = gnRowID ' Change the N/E values to the new coords in the
OBJ, after the move
_______________________________________

I put the note in as a debug aid to a) satisfy myself that I was getting
into the handler, and b) to confirm that Stop.Eastings exists.

But at run-time I get an error on the Set.. command, to the effect that
Eastings doesn't exist.
But the note works.

I quadruple-checked that the field IS actually called this, and that
it's spelt right, and that the syntax of the command is as in Help.  It
doesn't object to Northings.

Me flummoxed!

'ppreciate it

Terry


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

Reply via email to