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: 
dynamitemedia
Binge Watcher

Re: issues with buttons on regScreen

chris this is where it is confusing to me...

if you look at the register example in the 2.7 sdk

you will see this code is already there. in the doRegistration() above, in the first Function of the regScreen.brs file.

again i have went back and used the register example as is, are you telling me i need to add this code elsewhere?

and if so will that effect that same code placed in the doRegistration()

displayRegistrationScreen() is where you actually see the buttons added, so do i add it there?

Its confusing why the example wasn't made a actual working example, makes using the examples so confusing at times :?

i understand the backend not working but why the button functionality was left out is curious to me.
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
RokuChris
Roku Employee
Roku Employee

Re: issues with buttons on regScreen

I'm sorry, I'm not sure I follow you. The event loop already exists in the sample code. You just have to add handling for your new buttons to that event loop. Don't add a completely new event loop.

The examples are only examples. They must be adapted to specific situations since no two content providers are going to implement the back end the same way. The examples are to learn from and build on, they are not a complete a solution to every developers situation.
0 Kudos
dynamitemedia
Binge Watcher

Re: issues with buttons on regScreen

"RokuChris" wrote:
The examples are only examples. They must be adapted to specific situations since no two content providers are going to implement the back end the same way.. The examples are to learn from and build on, they are not a complete a solution to every developers situation


As i already said Chris i understand that with the backend but why not have the buttons work?

the up button or exit buttons dont do anything. when the examples are all we have to learn from and no other forums but this one to ask questions about brightscript. It makes learning quite difficult :? what nay be simple to you, is not for everyone else.

I have posted code to show i am trying to figure this out and not just asking for you to write my channel. every way i have tried for the last two days fails.

I would appreciate if someone could help on this and i am sorry if i have offended anyone. But i need help so i came to the "help" forum.
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
RokuChris
Roku Employee
Roku Employee

Re: issues with buttons on regScreen

"dynamitemedia" wrote:
the up button or exit buttons dont do anything.


I just installed the 2.7 SDK "register" example and it seems to work as expected. The UP and BACK remote keys do not raise an isScreenClosed() event on a roCodeRegistrationScreen. I believe that has always been the case. The best way to give the user the ability to back out of a roCodeRegistrationScreen is to add a "Back" button like the one in the example.
0 Kudos
dynamitemedia
Binge Watcher

Re: issues with buttons on regScreen

The best way to give the user the ability to back out of a roCodeRegistrationScreen is to add a "Back" button like the one in the example.

I said i have used the example exactly "as is" in my other posts and that the back button is there but i can't get the " back" button to do anything.

i can't get the "get new code" button to do anything either. even if you put a print statement, nothing prints to the debugger when i click these buttons.

i have shown examples of me trying to get them to work, they dont work as is. and even when i tried as shown by my code above, to get them to work they do not work. I don't know what else or any other way to ask.

can you tell me from this example if you loaded it, why these buttons don't work and what needs to be done to get them to work?

thank you
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
RokuChris
Roku Employee
Roku Employee

Re: issues with buttons on regScreen

When you say you have used the example as is, do you mean you have installed the example channel or that you have copied code out of the example channel and into your channel? The "Back" and "Get new code" buttons work correctly for me when I install the example channel. If you are just copying code from one channel to another, there is probably going to be some tweaking necessary. A few of us have tried to point you in the right direction, but exactly how the example will need to be tweaked to fit into some other channel is not easy to predict.
0 Kudos
dynamitemedia
Binge Watcher

Re: issues with buttons on regScreen

When you say you have used the example as is, do you mean you have installed the example channel or that you have copied code out of the example channel and into your channel?


I am using the "register example" from the examples in 2.7 SDK. I have said this several times. and in fact have counted 7 x's in this thread where i said i am using the "register example" and as is, is just that as is.. i showed that i tried changing it to get the buttons to work, not sure why or what i said that made anyone think otherwise.

its not in my code, not in another channel, i am trying to use the "register example" to learn how to use it so i can add to my channel later.

The "Back" and "Get new code" buttons work correctly for me when I install the example channel.


when i click on the buttons they do nothing. the only thing i changed was added a sleep(5000) because it was registering so darn fast i couldn't test the buttons. so the sleep makes it sit there "retrieving code..." for 5 seconds

If adding the sleep made the buttons not work, maybe you can tell me what i can do so that this example just doesnt fly through and go to the congratulations screen in about 1 second flat.

i have print statements and they too are doing nothing as well. are you saying the buttons you see on the screen are working for you when you click them? the "get a new code" and "Back" buttons?

A few of us have tried to point you in the right direction, but exactly how the example will need to be tweaked to fit into some other channel is not easy to predict.


I am not asking about tweaking it, i have stated from the get go, i just want to know how to get the "register Example" and its buttons to work. I only want to know how to get this example working, then i can learn what its doing so i can use it and tweak into my channels. I am not asking anyone show me anything other than how to make these buttons work.
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
TheEndless
Channel Surfer

Re: issues with buttons on regScreen

"dynamitemedia" wrote:
when i click on the buttons they do nothing. the only thing i changed was added a sleep(5000) because it was registering so darn fast i couldn't test the buttons. so the sleep makes it sit there "retrieving code..." for 5 seconds

If adding the sleep made the buttons not work, maybe you can tell me what i can do so that this example just doesnt fly through and go to the congratulations screen in about 1 second flat.

Adding a sleep is probably exactly what's causing it to not work for you. Sleep pauses all code execution for the duration specified, so no events would get through either.
Commenting out the "if msg = invalid exit while" line should get it to not exit immediately for you.

Everyone posting in this thread is trying to help you. It's understandably frustrating for you, but if you're going to have an attitude every time one of us asks a question, you're going to quickly run out of people willing to help. Clearly adding a line of code to the example is not using it "as is" as you keep repeating, and in fact is what's preventing it from working for you, so if you're not going to provide the full details, and you're going to get upset every time someone asks for more details, then you're not going to get very far.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
dynamitemedia
Binge Watcher

Re: issues with buttons on regScreen

i was using as is and it was not working for me. so i added the sleep to it.

if you look at the code i posted earlier, does it show a sleep? no it does not because i am trying everything i can to get it to work, the example does not seem to work for me. all i have asked is someone tell me how to get it to work.

it still does not work as is....

also what you posted :

Commenting out the "if msg = invalid exit while" line should get it to not exit immediately for you.


can you explain why this would stop it from registering so quickly and going straight to the "congratulations" screen?

I tried it, and this also doesn't do anything to stop it from jumping right on through the to the congratulations screen.
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
TheEndless
Channel Surfer

Re: issues with buttons on regScreen

"dynamitemedia" wrote:
i was using as is and it was not working for me. so i added the sleep to it.

if you look at the code i posted earlier, does it show a sleep? no it does not because i am trying everything i can to get it to work, the example does not seem to work for me. all i have asked is someone tell me how to get it to work.

As I noted earlier, the code you posted is not directly from the register example. It's some sort of combination of two of the functions from that example, and won't work. Whether it has a sleep or not is irrelevant to your current issue, as it's clearly not the example code that you're using "as is".

"dynamitemedia" wrote:

Commenting out the "if msg = invalid exit while" line should get it to not exit immediately for you.


can you explain why this would stop it from registering so quickly and going straight to the "congratulations" screen?

I tried it, and this also doesn't do anything to stop it from jumping right on through the to the congratulations screen.

It won't. I missed the outer While loop. Sorry...
Try temporarily commenting out the "if status < 3 return status" line instead.


EDIT: To expand on that... unless your m.UrlGetRegResult url returns XML with a root node of <result>, status is going to equal 2 and exit the screen, because of these lines in the checkRegistrationStatus() function, which I suspect is why it's exiting immediately:

if not xml.Parse(rsp) then
print "Can't parse check registration status response"
ShowConnectionFailed()
return 2
endif

if xml.GetName() <> "result" then
print "unexpected check registration status response: ", xml.GetName()
ShowConnectionFailed()
return 2
endif
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos