Open stargazing-dino opened 2 weeks ago
Rhai is not JavaScript. Therefore methods are not stored as properties in the hash map.
map.my_cool_function()
means my_cool_function(map)
, in Rust style, not JavaScript style.
Therefore, map
has no property named my_cool_function
.
I register a function that operates on a function pointer
This successfully prints "my_cool_function". The signature of name_of_function is also correctly (Fn)
I then read about JS Style scriptable event handlers and am inspired to make a map for my function state:
This pattern is useful and seems to work for my purposes.
However, doing this does not work.
I get this error:
Is this expected behavior?