This is what information I can provide on some of the questions recently raised about workspaces.
Mr. Hankins first raised the question about the error message "Variable uniqueStringName already defined". He was rightly concerned that he would have to edit his many workspaces, which he had not changed. The only reason for this error that we know of is exactly that which Mr. Driver replied a day later. If a workspace fails to open in between where a variable is defined (Dim) and undefined (Undim), then that variable is forever (in that session of MapInfo Professional) defined in the global interactive namespace. This would be the same as if you went into the MapBasic Window and entered Dim x as integer and hit enter on it twice. You would get the same error. Mr. Driver mentioned that if you exit Pro and start up again this will go away which is certainly true. You can also open up the MapBasic Window and enter Undim uniqueStringName and then you don't have to exit the program. As this is clearly an annoyance, we are looking into the idea that we could silently ignore this error. Off hand, I can't think of any bad side effects of this change. However, it is just an idea. Note that there is nothing about this issue that is specific to version 8.0. Also, the use of the variable was added a few years back to fix a problem where the session coordinate system would be set to Lat/Long after a Layout statement, regardless of what it had been before the Layout. The variable was added to hold the name of the previous coordinate system string before starting a Layout so that the actual coordinate system could be maintained. Then, Mr. Parker mentioned a similar error that said "Field _var_ not defined". The error was supposed to be related to using a raster image in the layout, presumably as a layer in a map. We have not been able to reproduce this with the information presented. I would hope that Mr. Parker could forward his information including a sample workspace to [EMAIL PROTECTED] and we will follow up with an answer as soon as possible. Later, Bill from DataDirections added to the list a complaint that MapInfo was adding Add Column statements to workspaces that never existed before. What I can tell you is that MapInfo Professional has for a very long time added Add Column statements to workspaces when a temporary column existed in a table. The workspace is supposed to preserve the table as used in the session and the Add Column statement does this. There is nothing new here. However, Bill was also getting an error "No end quote on string constant" and the example he provided showed exactly why that error occurred. Neither MapBasic compiler nor our workspace reader or interpret mode processing (Run Command statements) support string constants spanning a text line. However, what is something of a mystery is how he got into that situation. We have determined that there is a way to do it. The Add Column statement he posted in his message can be executed in the MapBasic window without error. Exactly why this is allowed has not been determined. However, the result is that the column data is exactly as specified which means that it includes a newline character in the string. You can't see this in the browser as the browser ignores line feeds. However, if you print the value in MapBasic or use the value as a label expression, you will see a second line in the text string. Anyway, once that data with a newline has been entered, the workspace is not written out in a way that it can be read back. It has string constants spanning lines of text in the workspace. This problem will be looked into. As I said, I don't know if Bill entered these this way but it is the only way that we can reproduce this. Also, he seemed to indicate that he had no reason to have these statements at all. I can assure you that MapInfo Professional would not be making up Add Column statements. The added columns would have to have been executed prior to saving the workspace. I want to assure you that there is nothing dramatically different in the way version 8.0 processes workspaces. The issues raised will be looked into but except for Mr. Parkers issue, there is nothing related to version 8.0 and in that case, we just don't have enough information. Please feel free to send along your information on these issues to TechSupport and if I can add any other technical details, I will. Sincerely, Eric Blasenheim Software Architect MapInfo Corporation
