MapInfo Pro Developers User Group

Expand all | Collapse all

The Old ToolHandler Routine

  • 1.  The Old ToolHandler Routine

    Posted 17 days ago
    Hello Everyone,

    Back in the old days Mapbasic had something called toolhandler. When this subroutine was defined a button would be added to the button pads and when it was used if would fire off this toolhandler routine.

    I wonder if there is an equivalent in Version 17? - I am converting old code to v17 and the tool handler was used as a kind of hidden tool (the user drew a Polyline and then was able to click on the map to define a point without changing tool - in fact to the user it was a single tool.

    I know I can replicate this by defining two buttons but it got me thinking if there was a way to have a hidden button rather than one visible to the user?

    If so, how?

    I am going to look into but I thought i would ask first!

    Many thanks

    Regard

    ------------------------------
    Martin Hodder
    Higher Mapping Solutions (OEM)
    ------------------------------


  • 2.  RE: The Old ToolHandler Routine

    Posted 17 days ago
    Just a quick update - The toolhandler does appear on the legacy TAB but I can't run it from code.

    I will have to see if there is a way to hide a button but still be able to use it!

    ------------------------------
    Martin Hodder
    Higher Mapping Solutions (OEM)
    ------------------------------



  • 3.  RE: The Old ToolHandler Routine

    Posted 16 days ago
    Hi Martin

    There was an earlier discussion around the toolhandler.
    It turned out there were some issues with it which were fixed in MapInfo Pro v2019.2

    If you go to the other discussion, Bob provided a possible workaround for v17

    ------------------------------
    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------



  • 4.  RE: The Old ToolHandler Routine

    Posted 16 days ago
    Edited by Bob Fortin 16 days ago
    Hi Martin,

    We also fixed an issue with ToolHandler in 2019.3 that only showed up if you were running and mbx with a toolhandler from a "run application " command.

    In 2019.3 the button appears on the map tab. you could probably hide it if you wanted to.

    -Bob

    ------------------------------
    Bob Fortin
    Software Architect and Distinguished Engineer
    MapInfo Pro Development Team
    ------------------------------



  • 5.  RE: The Old ToolHandler Routine

    Posted 15 days ago
    Hi Bob and Peter,

    I will look into it. The client wanted v17 but they are looking to go to 2019.3 so I can test that and see if it works.

    Thanks for replying

    ------------------------------
    Martin Hodder
    Higher Mapping Solutions (OEM)
    ------------------------------