Sorry for the long code, but my environment does not support script tags.
I try to call loadbang (line 976) and get
_r.Multistrokes[z].name is undefined
I thought I defined it right there in the function, no?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your
Multistrokeconstructor function (it’s not a “class”) sets theNameproperty on the object (line 103):But on line 1,000, you’re trying to use the
nameproperty (note the difference in capitalization):JavaScript is case-sensitive.
Side note: Line 1,000 also has the issue that you’re not actually calling
toString, you’re assigning the function reference tostrokeName[z]. To actually call it, add()to the end oftoString.Side note 2: The code relies heavily on the abomination that is JavaScript’s automatic semicolon insertion. Strongly recommend not relying on it, and putting in all necessary semicolons explicitly. Relying on ASI makes minification difficult, and can introduce subtle bugs.