I have a very strange problem:

First I have a global definition:

Global s_EllipseCentreLat AS STRING

I have a menu option which calls a dialog box. The dialog box has this code:

  DIALOG
    POSITION 491, 359
    WIDTH 165 HEIGHT 153
    TITLE "Create Ellipse"

    CONTROL EditText
      POSITION 73, 27
      WIDTH 80 HEIGHT 12
      'ID Edit1ID
      Value "0.001"
      INTO s_EllipseCentreLat

    CONTROL OKButton
      POSITION 47, 130
      WIDTH 38 HEIGHT 14
      'ID OK1ID
      TITLE "OK"
      CALLING Mission0EllipseOKButtonCalling

So, it's basically edit test box & an OK button. The handler looks like this:

SUB Mission0EllipseOKButtonCalling

        Print "Ok button pressed from Ellipse dialog"
        
        Print Time(24) & " " & s_EllipseCentreLat
        
END SUB


The really strange thing is that when I run the dialog & press Ok, I get the 
correct time 
printed out, with no variable value.

When I run the dialog the second time & press Ok, I get the correct time 
followed by 
0.001 which was the original value! It seems the variable is not populated when 
the Ok 
button is pressed, but at some stage after that. If I change the value of the 
variable I 
don't see that new value after pressing the Ok button, but instead see it the 
NEXT time 
I press the Ok button - it seems to be lagging behind.

Anyone know why this happens? I've never had any trouble like this before and 
am 
mystified as to what is causing it.

(MapInfo 8.0 & MapBasic 8.0)

Thanks,

Dave 
_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to