Hi,
I’m trying to get a simple function with a variable number of parameters working:

"""
\startluacode
interfaces.implement {
  name      = "Autoren",
  public    = true,
  arguments = { "hash" },
  actions   = function(t)
    logs.report('Autoren', 'interface got table of length ' .. #t)
  end
}
\stopluacode

\starttext

Info:
\Autoren[text=Hans,melody=Hraban]

\stoptext
"""

The table t has always length 0. Where’s my error?

And is there documentation on interfaces.implement anywhere?

Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to