Use this thread to discuss your questions and comments about how to run the lesson.
Why do the variables have to be local for this project to work?
Actually the variable in this example is global. The variable is created outside of the function.
A variable declared outside a function, becomes global. A global variable has global scope which means the variable is accessible and modifiable throughout your program by any code, and also in any function.
Thanks Karen. I knew that but what I didn’t know until I read more is that to use getText to assign to a variable can only be used in an onEvent - “getText() is usually used in an onEvent() callback function, and returns a string that can be stored in a variable or used as a parameter in another function call”
On stage 8, it says to use a UI control called textArea. I can not seem to find this control anywhere. Can anyone help with this?
Hi @kathryn_cogdell - if you go to the “design” panel in the top left hand corner, you will see a way to add a “Text Area” to the app. Here’s what mine looks like! Hope that helps!
I like the way I can view the code each of my students has written. Is there any way I can edit it, though? (The screen I use says “View Only”). Students are getting stuck with some simple formatting errors. It’s hard to get to them all in class but it would be nice to correct small errors and send them a message about it.
Hey @vfiddes that currently isn’t a feature. You would need to remix your student’s project and make edits in the copy of it that you own using the current system. Tools to provide feedback more easily is something we’re going to be looking into more closely this year, however, so we may at some point have tools that address at least half of your concerns.
Hope that helps!