Class methods don't raise an error when parameter missing

Report problems with documented functionality
logithack1337
Posts: 7
Joined: 18 Dec 2015, 02:58

Class methods don't raise an error when parameter missing

25 Sep 2017, 06:15

Hey everyone,

I'm not sure if this is actually a bug, but I've just encountered some strange behaviour when calling a class method without passing a parameter to it. I've discussed this with sj1k (Sjc1000) and a few other guys on #ahk and they hadn't experienced that problem before either.

Consider this code (expand):

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



If function() is called without a parameter, it raises an error, whereas t.method() just stops. Has anyone encountered this before?

Thanks for your help!

Regards,

logithack
User avatar
nnnik
Posts: 2288
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: Class methods don't raise an error when parameter missing

25 Sep 2017, 09:27

Yes I think it is intended.
Recommends AHK Studio
Helgef
Posts: 2417
Joined: 17 Jul 2016, 01:02
Contact:

Re: Class methods don't raise an error when parameter missing

25 Sep 2017, 10:38

I'm not sure where or if this is documented, but it is known and applies to all function references and bound funcs. :wave:
Cheers

Spoiler

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 1 guest