Sorry I missed this in the vim9 help :)
**vim9-no-dict-function*Later classes will be added, which replaces the "dict function" mechanism.For now you will need to pass the dictionary explicitly: > def DictFunc(self: dict<any>, arg: string) echo self[arg] enddef var ad = {item: 'value', func: DictFunc} ad.func(ad, 'item')You can call a legacy dict function though: > func Legacy() dict echo self.value endfunc def CallLegacy() var d = {func: Legacy, value: 'text'} d.func() enddef* Le samedi 10 décembre 2022 à 10:37:53 UTC+1, N i c o l a s I I T h e B l o o d y a écrit : > Hello Bram, > > Hope your health is back to its best. > > Question: Until the classes are implemented in vim9script, how to replace > the mechanism of 'functions'dictionary ' historically used in legacy > vimscript in vim9script? > > Here is an example of a state machine used in tagbar > https://github.com/preservim/tagbar/blob/master/autoload/tagbar/state.vim > > Thanks > Nicholas > -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/5ca0ee0a-9ae7-4199-a470-116238cd26f4n%40googlegroups.com.