We had the same thing - it seems pointless to write your own version of the
MI select tool for dragging nodes around - but then you don't have a tool
handler to trap what they did

You should look at the SelectionChangedHandler for an MBX - but you need to
avoid having too much code in it because it gets called all the time.

So - Activate the select tool via a toolbutton or menu option of your own -
make the menu/tool call a routine that sets a global logical value

eg - have all your menu items call one routine - and use CommandInfo
(CMD_INFO_MENUITEM) to find out which one it was - or the buttonpad
equivalent

Sub MyToolActivator

        If the menu item that called me is the select tool then 
                glIAmEditing = TRUE
                Activate the select tool
        else
                glIAmEditing = FALSE
                Activate whichever tool it is according to the menuitem
        end if
end sub

Then in your selection handler only do something if you're editing

Sub SelChangedHandler
        if glIAmEditing = TRUE then
                Use selectioninfo to see if the user is still selecting the
table you want them to edit ie hasn't clicked off
                Use TableInfo to see if they have edited anything
                Do whatever it is you need to do at this point
        end if
End Sub

Note - in integrated mapping you can simulate the selchangedhandler by
evaluating the contents of the string sent to SetStatusText

HTH
 

Paul Crisp

Syntegra
Innovation Place Delta Bank Road Newcastle NE11 9DJ
Tel 0191 461 4522 Fax 0191 460 1987


-----Original Message-----
From: Chris Stutz [mailto:[EMAIL PROTECTED]
Sent: 10 October 2003 16:12
To: [EMAIL PROTECTED]
Subject: MI-L is it possible to make a custom edit tool/handler?


Hello All:
 
I'm trying to create an MB routine that will detect when an object is
changed so that I can update a 'last modified' column. I'm using MI 6.5.
 
>From reading through the archives, it appears this isn't a straightforward
matter.  I think I understand several people to recommend creating a custom
tool to handle edits and then forcing the user to use the custom tool
instead of the standard select tool.  But while I know how to make a custom
draw tool, I don't know how to make a custom edit tool.
 
What am I missing? 
 
 
Thanks,
Chris
_______________________________ 
 
Chris Stutz 
Associate 
 
SPACE SYNTAX
 
11 Riverside Studios
28 Park Street
London 
SE1 9EQ
United Kingdom 
 
tel           +44  (0) 20 7940 0000
fax          +44  (0) 20 7940 0005 
email       [EMAIL PROTECTED]
web         http://www.spacesyntax.com
_______________________________ 
 
Space Syntax Limited. Registered Office:
Holborn Hall, 100 Grays Inn Road London, WC1X 8BY
Registered in England no 2404770. 
_______________________________ 
 
This document is confidential to the 
addressee and may be privileged. Neither 
the confidentiality nor any privilege is 
waived, lost or destroyed by reason that 
it has been mistakenly transmitted to a 
person other than the addressee. If you 
are not the addressee please contact 
this office immediately. 
_______________________________ 
 


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

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.syntegra.com

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

Reply via email to