Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
fasty23
Level 7

Selected attribute

Hi,
What is the attribute for elements those are selected or not (true/false)? 
For example:
Radio buttons or check boxes. For e.g. AppleTv has "selected' attributes.
Does Roku have something similar?
Thank you.
0 Kudos
5 Replies
renojim
Level 8

Re: Selected attribute

CheckLists have checkedState:  https://sdkdocs.roku.com/display/sdkdoc/CheckList#CheckList-Fields
RadioButtonLists have checkedItem:  https://sdkdocs.roku.com/display/sdkdoc/RadioButtonList#RadioButtonList-Fields
0 Kudos
fasty23
Level 7

Re: Selected attribute

"renojim" wrote:
CheckLists have checkedState:  https://sdkdocs.roku.com/display/sdkdoc/CheckList#CheckList-Fields
RadioButtonLists have checkedItem:  https://sdkdocs.roku.com/display/sdkdoc/RadioButtonList#RadioButtonList-Fields

Thank you renojim,
In "SceneGraphTutorial" source code found:
example = m.top.findNode("exampleCheckList")
example.checkedState = [ true, false, true, false ]
When I do inspect elements by "sgnodes all" with telent I cannot find any value related to checklist items that returns checkedState array (boolean). (any help appreciated) 
In the next step I need to find a link to between element and checkedState that probably ispossible by having index of element in checklist  and compare it with checkedState array.
0 Kudos
renojim
Level 8

Re: Selected attribute

You're connecting to the wrong port to do serious debugging/inspection.  You want to telnet to port 8085.  Press Ctrl-C or better yet put a stop statement in the code right after the place where the variables you're interested get used or initialized.  Then use:
?example.checkedState


-JT
0 Kudos
fasty23
Level 7

Re: Selected attribute

"renojim" wrote:
You're connecting to the wrong port to do serious debugging/inspection.  You want to telnet to port 8085.  Press Ctrl-C or better yet put a stop statement in the code right after the place where the variables you're interested get used or initialized.  Then use:
?example.checkedState


-JT

Thank you renojim,
I used port 8085 based on https://sdkdocs.roku.com/display/sdkdoc/Debugging+Your+Application 
But we are trying to get "page source" dynamically while app is running to modify appium to handle Roku testing, so far we used "sgnodes all"  to get get "native page source" and interpret them and get info but for checkState it seems it's info is not in node and restores somewhere else.
RALE app be able to get checkState array but mechanism for us is unknown.
0 Kudos
renojim
Level 8

Re: Selected attribute

RALE communicates with the running channel directly using code found in the RALE component.  You could do something similar, but I don't think you'll get what you want using "sgnodes all".

-JT
0 Kudos