Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dwdeveloper
Reel Rookie

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")

 

0 Kudos
2 REPLIES 2
dwdeveloper
Reel Rookie

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.

 

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.

0 Kudos