Class methods don't raise an error when parameter missing

Post a reply

Confirmation code
Enter the code exactly as it appears. All letters are case insensitive.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Class methods don't raise an error when parameter missing

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

Post by Helgef » 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

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

Post by nnnik » 25 Sep 2017, 09:27

Yes I think it is intended.

Class methods don't raise an error when parameter missing

Post by logithack1337 » 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]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

Top