Developers

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dynamitemedia
Binge Watcher

Dialogo box in SpringBoard ?

Is this possible or am i treading my wheels on nothing?

I am trying to get the tweet button i have on my spring board to popup and confirm they want to tweet what they are watching.

as it is now it will just tweet as soon as they click the button
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
Tags (1)
0 Kudos
5 REPLIES 5
TheEndless
Channel Surfer

Re: Dialogo box in SpringBoard ?

I have a Utility function for this purpose. You're welcome to use it...

Function ShowMessageBox( title As String, message As String, buttons = [ "OK" ] )
messageBox = CreateObject( "roMessageDialog" )
messageBox.SetMessagePort( CreateObject( "roMessagePort" ) )
messageBox.SetTitle( title )
messageBox.SetText( message )
For buttonIndex = 0 To buttons.Count() - 1
messageBox.AddButton( buttonIndex, buttons[ buttonIndex ] )
Next
messageBox.Show()
While True
msg = wait( 0, messageBox.GetMessagePort() )
If msg <> invalid Then
If Type( msg ) = "roMessageDialogEvent" Then
If msg.IsButtonPressed() Then
Return buttons[ msg.GetIndex() ]
End If
End If
End If
End While
End Function

In your case, you'd call it like this...

result = ShowMessageBox("Confirm", "Are you sure you want to blah blah blah?", [ "Yes", "No" ])
If result = "Yes" Then
'Do that thing...
End If
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)
Tags (1)
0 Kudos
dynamitemedia
Binge Watcher

Re: Dialogo box in SpringBoard ?

Thanks Endless let me give that a whirl
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
Tags (1)
0 Kudos
dynamitemedia
Binge Watcher

Re: Dialogo box in SpringBoard ?

actually its doing the same thing to me as my function was.

i have it set up when i click one of the buttons so it goes like this

if msg.index() = 4
<code you gave me>
end if


and it keeps giving me this error, i got this on the one i was trying to...

*** ERROR compiling /pkg:/source/appDetailScreen.brs:
line 104, error code &h02: Syntax Error
line 123, error code &h02: Syntax Error


can i not have a function here? i tried " Sub" too but got the same errors.
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
Tags (1)
0 Kudos
TheEndless
Channel Surfer

Re: Dialogo box in SpringBoard ?

No, you'd need to put the ShowMessageBox function out by itself, and put the "result = ShowMessageBox..." code inside your event loop.
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)
Tags (1)
0 Kudos
dynamitemedia
Binge Watcher

Re: Dialogo box in SpringBoard ?

LOL, i am so sorry thats what i did the first time! then i thought it was wrong.

seems to be working now, let me check my Twitter to see if it is working, Thanks Endless
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
Tags (1)
0 Kudos
Community is Being Upgraded!

We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.

Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality. In the meantime, for additional assistance, visit our Support Site.

We're sorry for this disruption — we’re excited to share what’s next!