Developers

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dwdeveloper
Channel Surfer

ButtonGroups in Dialog doesn't react on click. No click event in OnKeyEvent

Hi,

I have created an Dialog and added a ButtonGroup inside it. Until now i could catch the click event in OnKeyEvent in Screen. 

function onKeyEvent(key as String, press as Boolean) as Boolean

 And our app works fine. But since shortly i don't know when key event doesn't occur from ButtonGroup.

IS THERE ANY CHANGES in Dialog ?

it works only with

dialog.observeField("buttonSelected","onbuttonClick")

 

Tags (1)
0 Kudos
2 REPLIES 2
dwdeveloper
Channel Surfer

Re: ButtonGroups in Dialog doesn't react on click. No click event in OnKeyEvent

In

onbuttonClick i handle 2 buttons:

    if buttonSelected = 0 . go to other dialog

  if buttonSelected = 1 cancel

But if i click "OK" on the remote while select cancel, the "OK" click go "through" the dialog and the "OK" click will handled in mainscreen in OnKeyEvent again. So the dialog will open again, because that is the ok click.

How can i prevent that ?    Why click event go through from dialog to mainscreen ? i'm very frustrated.

 

Tags (1)
0 Kudos
gomad
Roku Guru

Re: ButtonGroups in Dialog doesn't react on click. No click event in OnKeyEvent

in the 

onKeyEvent 

you should be getting all the key events of the "top" screen in "focus".

 

Also you cannot create nested dialogs, u need to clear one then create a new one again.

Tags (1)
0 Kudos
Community is Being Upgraded!

We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.

Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality. In the meantime, for additional assistance, visit our Support Site.

We're sorry for this disruption — we’re excited to share what’s next!