Terry
 
Two things you could do - one is set a global logical when the system
realises you are carrying out this information - and refer to this logical
before creating a new cursor. (oops, sorry, just looked at your code and you
ARE). The other - probably better - route is to use a custom tool and have
your mouse clicks call the tools handler routine. This gives a you a specific
'route ordering' tool with no problems about the SelChangedHandler() getting
called unexpectedly - bear in mind too that it will be called whenever the
selection changes wherever and whenever and this could slow up your app. 
 
The MapBasic user guide and ref wil help - pretty sure that the second at
least is a free download.
 
Rgds

        -----Original Message----- 
        From: Terry McDonnell [mailto:[EMAIL PROTECTED] 
        Sent: Tue 15/06/2004 11:41 
        To: [EMAIL PROTECTED] 
        Cc: 
        Subject: MI-L Selecting Bus Stops in Stopping order
        
        

        Hello again, List
        
        I've still got this problem of clicking on Stops along a Route and
        storing them, in the order in which they're clicked on, as the
Stopping
        order. What I've done is:
        
        Set a counter to be incremented with each stop clicked on.
        Then. holding down the Shift button, as each stop is clicked on, the
        SelChangedHandler() event essentially stores the Stop No. and its
order
        in a cursor (csrStopOrder).  This cursor is later used to update the
        Route-Stops table (RZSTOP).
        I also have taken care of the fact that the user may click on a stop
        again (say if wrongly selected) to deselect it, remove it from my
list
        and decrement the counter.
        
        Trouble is:  I discovered that it would get so far then a certain
stop
        no. would be repeated, ad nauseum, in the order cursor.  The culprit
is
        that after each time coming out of the handler, the damn selection
table
        has spawned another query (1, 2, 3 etc.), each having a successively
new
        row added to it, with the new Stop no.  So when I get the stop no,
from
        Selection.Stop_no, it refers back to the original selection, and not
my
        latest.
        
        This wasn't happening  before I used the handler, before I realised
that
        the selection table does not store each new row in the order in which
it
        was  created (such as a VFP table would).
        
        How can I get round this problem?  Essentially I want to keep just
the
        one selection table.  Your help would be greatly appreciated as I'm
at
        the end of my expertise.  TIA
        
        I've sent my code snippet in a separate message as the message is too
        large for the system if I include it.
        
        Terry McDonnell
        
        
        
        



********************************************************************

This email may contain information which is privileged or confidential. If you are not 
the intended recipient of this email, please notify the sender immediately and delete 
it without reading, copying, storing, forwarding or disclosing its contents to any 
other person
Thank you

Check us out at http://www.btsyntegra.com

********************************************************************

Reply via email to