Skip to main content
15-Moonstone
Oct 16, 2017 11:17 AM UTC
Question

Event router widget for calculator application to create expression.

Hello,

I tried using event router for building calculator based application, but i see that the output is not getting changed on every click.

below image for reference when i tried.

In the above image for button 1 & 2 click the context id mapped with same 1 & 2 are not getting displayed in the output text box, but if i write anything on the other two text boxes and on leave from the text box, i am able to see the same in the output text box.

what am i missing in the button that i am not able to see the respective context ID in the out put text control on click ..???

Thanks

Sunay

8 replies

20-Turquoise
Oct 16, 2017 7:57 PM UTC

What is your ContextID bound to (what contents are you passing into the event router)?

ALso, the output of the events router is the last input provided.

Translate
sbt15-MoonstoneAuthor
15-Moonstone
Oct 17, 2017 11:49 AM UTC

I have hard coded the value which needs to be passed to button context ID. and i have mapped the ContextID to inputs of the event router as you can see in my first image.

Translate
1-Visitor
Oct 17, 2017 12:13 PM UTC

Hi,

the problem is event Clicked of button doesn't send the ContextId again to EventRouter. It's bound only once on load.

You can use an Expression widget to send ContextId from button to EventRouter. The button Clicked event can be bound to service Evaluate of Expression widget.

Translate
sbt15-MoonstoneAuthor
15-Moonstone
Oct 17, 2017 12:24 PM UTC

So if i have 20 buttons then i need to use 20 expression widgets..?

Translate