Quantcast
Viewing all articles
Browse latest Browse all 2341

New Post: Labels don't display (if the .DBF file doesn't have write permission)

Hi Brad,

Yes the location from which is run the application changes the behaviour, by debuging MapWinGis we have found that a temporary file is created in the working directory, i.e. the directory from were is run the application, if it's not changed during execution.

Actually the problem is not really that labels doesn't appears, this is not a display problem, but truly an attribute table creation problem.

"Are you moving the location of the "shp", "shx", and "dbf" files as well?" :
Wherever we store the output shapefile the problem appears (because a temp file is create anyway for storing a kind of temporary attribute table).

Run as administrator solves the problem for sure because it bypasses the UAC of windows 7, thus the program has all write permission to any directory. But running the application as admin should not be the solution as there is no need to run it as admin.

Actually we are just pointing out a wrong use of the _getcwd function that causes the attribute table not to be written in particular cases, but somehow quite common configurations. We have a fixed for that : replacing the call to _getcwd function by a getTempPath function that points to a directory always writeable for the user (appdata/local or locallow). Applying this fix to a recompiled ocx leads to a correct creation of the attribute table.

So the main question is : does a mapwingis developper agrees with this solution ? Or does the getcwd function is used on purpose in this case ?


Thanks
Pierre

Viewing all articles
Browse latest Browse all 2341

Trending Articles