I am working through the Ui masterclass video developing the playground part1
My paragraph content binding is set to “log”
my button on click logic looks like this
the first time I click the button I get “undefined” followed by my text message
for the second and all subsequent times the button is pressed I only see the text I expect “log message” undefined only shows up on first click.
I am guessing the issue is with first use of get property “log” of pagedata is returning undefined and then gets my text appended to it.
However I don’t see any differences between my set up and the video so I’m not sure what I am doing wrong.
thanks for your time.
Update: ( I no longer seem to have edit permissions on my topic so I’ll update via reply)
after testing I found adding the following to the page entry event
the issue seems to get resolved. But the training video did not use this step. So has something changed? must you assign a value to a “content binding” variable before you can reference it?
It seems odd that I’d need to do this, because the page entry event should define the binding on the paragraph so I should not have to set the property value on page entry to “” in order to get this defined.
thanks again for your time.
H
Hello @hharrington
Nothing has changed on our side, in the tutorial video also the message undefined appears after the first click on the button. You can see it in the screenshot. Your solution is perfectly valid.
Regards,
Inna
well, I feel both better and kinda stupid at the same time. thanks for pointing this out to me. I feel so much better.
Thanks very much for your time.
HH