getSubKeyMap
Closed this issue · 10 comments
There seems to be a couple issues with this function.
Getting a runtime error: index out of range [recovered]
First the switch is on the length of the split string. If the length of the string array is 3 (case 3), then you can't reference vv[3] which would be the 4th element right? It must be vv[2] to access the third string.
Second, if your text has any ":" in it, it will get confused. My text had a "http://blah/blah/blah" in it. So, after I made the above change, I got the error: "unknown subkey conversion spec:..."
Basically I was trying to read in a kml file, change the description and name fields and then print it back out. I was trying to use the
paths= PathsForKey("description")
values =ValuesForPath(paths[0]).
UpdateValuesForPath(newVal, path[0], "description:"+value[0])
with a double loop in there to get all the paths and values. But, because description can have any kind of text, this will not be possible. Is there a better way of doing this?
Thanks,
Lorie
Please send or post in gist an example of the data and code you're looking at.
I can provide a patch to address part 1 of your issue. The second part is one I need data for.
Can't email attachment to GitHub issue thread - please send directly to clbanning@gmail.com
Part 1 is at tip. Waiting on your zip file.
Please confirm that SetSubkeyFieldSeparator and SetNewvalFieldSeparator on tip address this issue.