Jengamon / ruwren

A Rustified binding for Wren
Other
40 stars 9 forks source link

How do I access a function handle in a module #9

Closed KHN190 closed 3 years ago

KHN190 commented 3 years ago

The example showed how to access a function handle inside a class, while how do I access a function directly inside a module - if it's possible?

// main.wren
var start = Fn.new {}
var update = Fn.new {}

I could check if they exists using has_variable for main module; then how do I use make_call_handle to access the functions? The slot id also is confusing for me, I didn't find any instruction how they are used from wren official.