On 26 Jul 2006 at 9:11, Peter Horsbøll Møller <[EMAIL PROTECTED]> wrote:
> This is the typical mistake when working with dialogs and reading values in a > handler. > The values on the controls are not written to the variables assigned to the > controls until the > dialog has been dismissed. > And the dialog has not been dismissed when you are within a handle of the > same dialog. Ah, I see. I've just started using Trey Pattillo's diabuilder (which is brilliant by the way - saved me about 30 hours already today!) so it works slightly differently to how I used to do it manually before (I think). Searching through my old code I can see ReadControl in a few places. Just to add to my confusion, looking at the MB help file it mentions: "Into clause: an individual dialog control can have an optional Into clause, which associates a program variable with the control. If the user clicks OK, MapBasic automatically copies the user's input into the variable. Note: MapBasic only updates the Into variables after removing the dialog, and only if the user dismissed the dialog by clicking OK." I wish they had mentioned that the dialog isn't actually dismissed by clicking OK until after the handler has finished. Anyway, you have solved my problem as usual, and I learnt something new today! :-) Thanks (to Stephen Chan as well for giving the same answer), Dave _______________________________________________ MapInfo-L mailing list [email protected] http://www.directionsmag.com/mailman/listinfo/mapinfo-l
