GM_LoadLayerListEx popups and clipboard pollution
Aloha!
I have written a chart file scanner application, which would: scan the specified chart repository, load potential charts via GM_LoadLayerListEx, and save the successful charts to a database. This is similar to your Map Catalog, but we needed more functionality, so we implemented our own. We are experiencing some issues with GM_LoadLayerListEx.
Certain chart types (so far *.txt) causes a dialog to popup even with the flags: GM_LoadFlags_HideAllPrompts | GM_LoadFlags_NoProjPrompt | GM_LoadFlags_HideWarnings | GM_LoadFlags_HideUnknownPrompt | GM_LoadFlags_UseDefaultPos, specified. For *.txt files, it pops up the "Generic ASCII Text File Import Options" dialog. I only have a small subset of file types, so there may be others that could popup a dialog. May I suggest, when GM_LoadFlags_HideAllPrompts (or whichever is relevant) is provided, only a message is generated via the function provided to GM_SetMessageCallback()? For our database, if the user wanted to add charts that do not provide enough information, they would need to provide it manually... and somehow provide the data to your Load functions. This manual add functionality is not needed at this time, but may be visited in the future.
There is an issue with error messages, which even though the error handler is provided with GM_SetMessageCallback(), the message is still placed into the clipboard. This is an issue, considering our chart scanner will be running in the background. Perhaps, if the error handler is provided, don't place the error message into the clipboard? Writing this post with the scanner running made it quite difficult to copy-paste code snippets.
Mahalo for your time and awesome work! Keep it up!
Chris
I have written a chart file scanner application, which would: scan the specified chart repository, load potential charts via GM_LoadLayerListEx, and save the successful charts to a database. This is similar to your Map Catalog, but we needed more functionality, so we implemented our own. We are experiencing some issues with GM_LoadLayerListEx.
Certain chart types (so far *.txt) causes a dialog to popup even with the flags: GM_LoadFlags_HideAllPrompts | GM_LoadFlags_NoProjPrompt | GM_LoadFlags_HideWarnings | GM_LoadFlags_HideUnknownPrompt | GM_LoadFlags_UseDefaultPos, specified. For *.txt files, it pops up the "Generic ASCII Text File Import Options" dialog. I only have a small subset of file types, so there may be others that could popup a dialog. May I suggest, when GM_LoadFlags_HideAllPrompts (or whichever is relevant) is provided, only a message is generated via the function provided to GM_SetMessageCallback()? For our database, if the user wanted to add charts that do not provide enough information, they would need to provide it manually... and somehow provide the data to your Load functions. This manual add functionality is not needed at this time, but may be visited in the future.
There is an issue with error messages, which even though the error handler is provided with GM_SetMessageCallback(), the message is still placed into the clipboard. This is an issue, considering our chart scanner will be running in the background. Perhaps, if the error handler is provided, don't place the error message into the clipboard? Writing this post with the scanner running made it quite difficult to copy-paste code snippets.
Mahalo for your time and awesome work! Keep it up!
Chris
Comments
-
Chris,
I have updated the SDK so if you provide either the "hide unknown prompt" or "hide all prompts" flag and try to load a generic ASCII text file, you will just get an error return. In addition, with the latest SDK build from http://www.globalmapper.com/GlobalMapperSDK_v14_latest_beta.zip you can call GM_SetMiscOption( GM_MiscOpt_DontCopyErrorToClip, 1 ); to disable the copying of any error messages to the clipboard automatically.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.bluemarblegeo.com/
Categories
- 12.8K All Categories
- 5.7K Features Discussion
- 345 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 637 GM Script Language
- 54 User Scripts
- 114 GPS Features
- 417 Projection Questions
- 826 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 178 Announcement and News
- 913 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 569 Other Discussion
- 131 GIS Data Sources
- 27 Global Mapper Showcase
- 238 How I use Global Mapper
- 107 Global Mapper Forum Website