Ewon TechForum
Providing technical solutions to technical requests


setEwonTagVal only works if tag is displayed?
AngelaT Offline
Ewon Distributor
#1
Has anyone seen this before?  I have a project with two views.  They are nearly identical.  Each has a group that consists of a rectangle with some text in it.  In each case, I have added an action so that if the group is clicked it uses a sendEwonTagVal to update a tag to particular value.  In one view, the text is fixed.  In the other view, there's an animation to display the value of that tag.  When I click on my group in the view with the fixed text and then check the tag value in the eWON's viewIO page, the tag hasn't changed.  When I click on my group in the view with the dynamic text and then check the tag value in the eWON's viewIO page, the tag has been set to the new value.  

I've attached the project in case anyone wants to take a look.  Maybe I did something stupid and am just not seeing it.  The view Home works as expected, but the view Dose2 does not. I even tried adding a commitEwonTagChanges into the mix to see if that helped, but it didn't.


Attached Files
.zip   BadButton.zip (Size: 180,64 KB / Downloads: 12)
Reply

Ludo Offline
eWON Support
#2
Hey Angela,

The reason is because on the dynamic view, viewon is communicating tags with the eWON at page load.
Your "Click me!" is telling viewon that he's linked to "ButtonPress" tag.

On the other static view, viewon isn't receiving instruction that there are links between elements and tags so it just cuts the polling/pushing system (see attached picture).


To solve this, you could add above your code in the static view the line "getEwonTagVal('ButtonPress');" to have something like:


Code:
getEwonTagVal('ButtonPress');
setEwonTagVal('ButtonPress',3);


Attached Files
.png   no_tag_poll.png (Size: 4,13 KB / Downloads: 31)
Reply

AngelaT Offline
Ewon Distributor
#3
Thank you!!! I figured there was just a piece I was missing. Thanks for your help.
Reply



Possibly Related Threads…
12-06-2020, 12:49 AM
Last Post: ablooabloo



Users browsing this thread:
1 Guest(s)



Theme © Ewon 2019 - Forum software by © MyBB - Cookie policy