Richard Emberson wrote:
> Just an FYI, I've just submitted a demonstration patch
> that allows one to do dictionary function chaining.
> Some of you might be interested in extending the
> patch to include value access via applying a key
> to the results of a function (if the function returns
> a dictionary).
> RME
>
> Text to bug report:
>
> This concerns functions and dictionaries
> While bug: 1491613 is a true error in the existing
> code, this bug is more of an enhancement.
> Currently if a function returns a dictionary, one
> can not call a function on that returned dictionary
> (or access a value via a key) inline:
>
> let v = dict1.getDict2().getValue()
I don't understand this remark, because it appears to work just fine.
An example that works:
fun! Try()
return 'called Try()'
endfunc
fun! One()
return {'one': 1, 'func': function("Try")}
endf
echo One()['one']
echo One().func()
What is it that doesn't work?
--
hundred-and-one symptoms of being an internet addict:
243. You unsuccessfully try to download a pizza from www.dominos.com.
/// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///