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: 
Komag
Roku Guru

Re: roSearchScreen -> isScreenClosed()

0 Kudos
cpjamloki
Visitor

Re: roSearchScreen -> isScreenClosed()

destruk your reply is satisfactory in case of trim().

But I am not understanding in case of :
Using SetSearchTerms() there are history or searchphrase appear.
How to catch individual index. suppose
i got 4 suggestion by searchPhrase.Len() > 2 like:
1) delhi
2)mumbai
3)kolkata
4)chennai

how to catch index 1) delhi which is in array 0 position. i want to block up button here.


When i am in 1) delhi and press up button here the screen gone close.
for this i am using
if msg.isButtonInfo()
print"key press search "msg.GetIndex()

but nothing will print in debug console when i am pressing remote key.
0 Kudos
destruk
Streaming Star

Re: roSearchScreen -> isScreenClosed()

If I understand what you are asking, you would probably have to check the search history terms themselves -

history = CreateObject("roSearchHistory")
list = history.GetAsArray()
print "There are "; list.Count(); " items in the history"
print list[0]
searchterm=list[0].trim()
if LEN(searchterm)>0 then return searchterm

If it's automatically closing when you hit up on the search history list, then you should check the length of the search term and if it's 0, or invalid, loop back to redraw the search screen again so they have to exit by selecting a cancel button or something, or just ignore the issue.
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.