Just wanted to add to the below that the problem is not just chaining
functions, but using the return value of the function itself. If the
function returns a dictionary (and probably a list), you can't use it to
access its members, so something like this will also fail:

let t.T()['abc'] = 'xyz'

However, using it in an expression works fine, e.g.,:

return t.T()['abc']

-- 
Thanks,
Hari

On Wed, 21 Jun 2006 at 3:38pm, Hari Krishna Dara wrote:

>
> I found a problem with chaining function calls through the new
> dictionary functions. Here is some code demonstrate the problem, if you
> execute this code, the last line generates an E488 error, where as the
> previous lines combines (they are equivalent) works fine.
>
> let tt = {}
> function! tt.TT()
>   echomsg 'This is TT'
> endfunction
>
> let t = {'tt': tt}
> function t.T()
>   return self.tt
> endfunction
>
> let tmptt = t.T()
> call tmptt.TT()
> call t.T().TT()
>
>

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to