BoundFunc.Name and retrieve its arguments?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
swagfag
Posts: 6222
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: 4709
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: 6222
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: 6222
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 (v1)”

Who is online

Users browsing this forum: makdc96, RandomBoy, Rohwedder and 173 guests