> > Can I pass one of the other type constants in Syntax.scala to > Syntax.reporterSyntax() in my definition of getSyntax() ? >
Yes. `table:get` returns an object of `WildcardType` [source <https://github.com/NetLogo/Table-Extension/blob/master/src/TableExtension.java#L194>], so you should be able to take a table as an argument by specifying the argument to be of `WildcardType`. The second problem is that Argument doesn't have a getter for > tables (again, of course), but it looks like I can just use Argument.get(), > so that's not a problem. > Right, you can just do `Argument.get` and then cast it to the type you're expecting. On Tuesday, December 8, 2015 at 1:35:12 PM UTC-6, Marshall wrote: > > I'd like to pass a hashtable made with the table extension to a reporter > defined in my own extension. > > For the standard simple way of creating extension, the first problem is > that Syntax doesn't have a type constant for tables. (Of course; why would > it?) Can I pass one of the other type constants in Syntax.scala to > Syntax.reporterSyntax() in my definition of getSyntax() ? (I don't fully > understand the code defining the various versions of getSyntax() in > Syntax.scala.) > > The second problem is that Argument doesn't have a getter for tables > (again, of course), but it looks like I can just use Argument.get(), so > that's not a problem. > > If there's an easy answer, great. If it's pretty complicated (e.g. I have > to add a file to the NetLogo source and recompile it), it might not be > worth the trouble (and you don't have to explain!). I can just pass a list > of lists to my extension function; it's not essential that I use a > hashtable, but I'd prefer that. There are only 172 entries. > > Thanks! > -- You received this message because you are subscribed to the Google Groups "netlogo-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to netlogo-devel+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.