BoundFunc.Name and retrieve its arguments?

Get help with using AutoHotkey and its commands and hotkeys
swagfag
Posts: 1371
Joined: 11 Jan 2017, 17:59

BoundFunc.Name and retrieve its arguments?

22 Oct 2018, 12:46

Code: Select all

adder(a, b) {
	return a + b
}

fn := Func("adder")
MsgBox % fn.Name ;works => 'adder'

fn := Func("adder").Bind(1, 2)
MsgBox % fn.Name ;doesnt work => ''
im wondering if theres some way to retrieve the name and bound arguments of a boundfunc object, that doesnt involve writing a custom class
Helgef
Posts: 3221
Joined: 17 Jul 2016, 01:02
Contact:

Re: BoundFunc.Name and retrieve its arguments?

22 Oct 2018, 13:52

No, boundfuncs only have a call method, nothing else. See Boundfunc .

Cheers.
swagfag
Posts: 1371
Joined: 11 Jan 2017, 17:59

Re: BoundFunc.Name and retrieve its arguments?

22 Oct 2018, 15:19

alrighty then, a custom class it is

Return to “Ask For Help”

Who is online

Users browsing this forum: Google [Bot], Mipha and 55 guests