Unit 6 Lesson 12 Forecaster App CSP '24-'25

What are we doing wrong? Here is the link:

What specific mistake(s) are we making?
We get warning: setText() text parameter value undefined is not a uistring.
Error TypeError: Cannot read properties of undefined (reading ‘toString’)
What is confusing is that we have copied and pasted the names of the variables necessary, have changed them up, followed line by line an exemplar, and still cannot seem to find the error. Please note, this is only my 2nd semester using CSP and I am new to programming.

Hello @darrin.patterson,

It seems that your project runs without issue, does this problem still exist?
if so we would appreciate your steps to cause this most likely this is a type error of some variable not being set before setText is called within this is referred to as a race condition which is quite common especially if your trying to retrieve data from an asynchronous request

thanks

Varrience

Varrience,
Thank you for reaching out. I found that the student, in line 23, used .Length rather than .length and this changed it. I double checked it by copying and pasting my example code, making the same change, and it didn’t give me the error, but it didn’t allow it to work until I changed it back to .length.

1 Like