How do I put in a watcher in App Lab

Can anyone give me an example of a watcher I could use in App Lab? My students want to see the x value of an id, but I’m not sure how to put it in since the id and property are separate parameters. I’m stuck in a dot-property mindset; I know how to use a watcher for sprite.x, but not id x-property.
Thanks for any guidance!

Hi @shannon_spisak,

With App Lab, you use getProperty to find the different attributes of objects. I have made an example of a basic setup for creating variables to view these attributes. I hope this helps:)


@melynn, Thanks for the reply. In the watcher is says variable/property so I was hoping we could use it with UI elements. I know how to use getProperty, but my students hadn’t learned it yet and we were trying to use what they did know.

I believe you need the “getProperty” getter to access the x value even in the watcher. I am not aware of a way to point to the x property of an object with the getter. From the documentation, it’s purpose is to let you “see the current value of any property listed in Design mode for a given UI element”.