MapInfo Pro Developers User Group

 View Only
  • 1.  How does one get a MapBasic script to run to completion using MapInfo 16.0 when it is halted by the query, "Do you want to save the workspace"?

    Posted 06-04-2018 23:54


  • 2.  RE: How does one get a MapBasic script to run to completion using MapInfo 16.0 when it is halted by the query, "Do you want to save the workspace"?

    Posted 06-05-2018 07:42

    This happens to my mbx programs too, David. It happened in v16, v17 beta and is still happening in v17. This prompt is displayed only when certain custom mbx programs are running, and occurs even if no workspaces and tables are open. I have turned off appropriate settings in the backstage area with no luck. I would be grateful if a solution or some information can be provided that would help with this.

    If you are auto-loading mbx programs that are not needed when you are running the MapBasic script, you might like to try unloading them first, to see if that helps.



  • 3.  RE: How does one get a MapBasic script to run to completion using MapInfo 16.0 when it is halted by the query, "Do you want to save the workspace"?

    Employee
    Posted 06-06-2018 07:55

    Does your tools happend to issue statements like:

    Close All Interactive?

    If they do, you could try to remove the Interactive keyword. This will close all without asking the user to save changes to the tables or workspaces.



  • 4.  RE: How does one get a MapBasic script to run to completion using MapInfo 16.0 when it is halted by the query, "Do you want to save the workspace"?

    Posted 06-06-2018 09:36

    Do this:

    i) Open MapInfo

    ii) Within the MapBasic window, issue the following statements:

    Create Table dummy (field1 Char(1)) File "C:\dummy.tab" Type NATIVE

    Drop Table dummy

    iii) Attempt to open a workspace. The "do you want to save the workspace" prompt will appear.

    It seems the prompt will appear if you have opened or created a table in the current session of MapInfo, then you proceed to open a workspace. If you close all first, then the prompt will not appear. If you Drop Table, MapInfo doesn't pick up on this and still displays the prompt, even if no other tables are open.

    This is all despite the fact that the "Prompt to save" option in Workspace Preferences is not selected.



  • 5.  RE: How does one get a MapBasic script to run to completion using MapInfo 16.0 when it is halted by the query, "Do you want to save the workspace"?

    Employee
    Posted 06-06-2018 09:45

    Whoops, that's certainly not the way things should work.

    Thanks for the clear description, @James Nolet?. That was easy to reproduce.

    I'll pass this onto engineering/tech support. Apparently the "empty workspace" doesn't get cleared unless you use Close All. Drop Table or Close Table doesn't make Pro see that "there's nothing to save"

    And as you said, the questions comes even though you have set Pro to only ask if a workspace has been opened.



  • 6.  RE: How does one get a MapBasic script to run to completion using MapInfo 16.0 when it is halted by the query, "Do you want to save the workspace"?

    Posted 06-06-2018 18:39

    Thank you Peter.

    Removing "Interactive" from Close All and End MapInfo worked fine.

    ?



  • 7.  RE: How does one get a MapBasic script to run to completion using MapInfo 16.0 when it is halted by the query, "Do you want to save the workspace"?

    Employee
    Posted 06-07-2018 12:20

    Peter\David

    I can replicate this behaviour in V17, I have subsequently passed this over to the engineering team, I will update you both when I hear back from the team.