John, thanks for your post.
I had tried moving the "navbar.type" up before the "navbar.file" before, but it didn't work. After seeing your example, I went back and retried. It still didn't work.
After confirming that your code worked and mine didn't, I slowly changed the code lines one at a time until I found the problem. It turns out the
"new File()"
object is the culprit. If you use that instead of assigning a basic string, you get the error.
I'm glad Adobe is letting use some scripting, but I'm a bit dismayed and shocked that the API is this brittle. It doesn't seem like it's had much, if any QA testing before release.