BoundFunc.Name and retrieve its arguments?

Get help with using AutoHotkey and its commands and hotkeys
swagfag
Posts: 1822
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: 3431
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: 1822
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
swagfag
Posts: 1822
Joined: 11 Jan 2017, 17:59

Re: BoundFunc.Name and retrieve its arguments?

19 Dec 2018, 16:40

oh lol, i googled "boundfunc name" and landed back here. it wouldve been nice if it were a thing

Return to “Ask For Help”

Who is online

Users browsing this forum: Albireo and 51 guests