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: 
fasty23
Visitor

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 5
renojim
Community Streaming Expert

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
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
fasty23
Visitor

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
Community Streaming Expert

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
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
fasty23
Visitor

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
Community Streaming Expert

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
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.