Eh, for the moment I'm just making s:ProjGetInfo return zero after the
error, then:

    " If it's a dictionary
    if type(project) == 4
        exec 'cd ' . project['path']
        " Customization file is not required
        if has_key(project, 'vim') == 1
            exec 'so ' . project['vim']
        end
        exec g:ProjFileBrowser
    end

Thomas

On Jul 21, 3:44 pm, Thomas Allen <[email protected]> wrote:
> On Jul 21, 1:25 pm, Ben Fritz <[email protected]> wrote:
>
> > Ugh, so much for the "not looking like an idiot".
>
> > This would work, except:
>
> > a) In Vim, unlike Perl, apparently non-null strings DON'T evaluate to
> > true (is this documented anywhere? I can't find it if it is!)
> > b) you weren't returning a string anyway.
>
> > Returning 0 should still work, but check that type(project) == type
> > ({}) for your sentinal, rather than checking for true/false of the
> > value itself.
>
> Yea, I thought of just returning something else and then checking it,
> but I figured vimscript can raise fatal exceptions. Is there a command/
> function to kill the script flow itself? I could add that to the end
> of s:echoError...
>
> Thanks,
> Thomas
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to