I have provided an updated debug and a more complete section of the code. The only time CTL-C is pressed is at the outset, so as to enable the micro debugger. I emphasize that the code works perfectly fine with Roku 2 series. However, in subsequent versions something has evidently changed with the "showRegDialog" function. I appreciate any guidance. Thank you.
------ Running ------
?BrightScript Micro Debugger.
Enter any BrightScript statement, debug commands, or HELP.
Current Function:
106: Function showRegDialog(infotype) As Integer
107: regDialog = createobject("roMessageDialog")
108: regDialog.setmessageport(createobject("roMessagePort"))
109: regDialog.enableoverlay(true)
110:
111: if (infotype = 0)
112: regDialog.setTitle("Supermediaplex")
113: regDialog.settext("Are you a Supermediaplex subscriber?")
114: regDialog.addbutton(0,"Yes")
115: regDialog.addbutton(1,"No")
116:
117: elseif (infotype = 1)
118: regDialog.setTitle("It's easy to get started.")
119: regDialog.settext("Go to your Internet browser and visit: WWW.SUPERMEDIAPLEX.COM")
120: regDialog.addbutton(0,"Done")
121: endif
122: regDialog.show()
123: while true
124: msg = wait(0,regDialog.getmessageport())
125: if msg.isscreenclosed() return -1
126: if msg.isButtonInfo() return -1 ' Info pressed again, dismiss the info overlay
127: if msg.isbuttonpressed() and infotype=0 then
128: button = msg.getindex()
129: print "Info Button ";button;" pressed"
130: if button = 1 then
131: isReady = ShowDialog2Buttons("Ready to get started?","","Yes","No")
132: if isReady = 0 then
133: showRegDialog(1)
134: endif
135: return 1
136: else
137: return 0
138: endif
139: elseif msg.isbuttonpressed() and infotype=1 then
140: return 1
141: endif
142: end while
143: end function
Break in 124
124: msg = wait(0,regDialog.getmessageport())
Backtrace:
Function showregdialog(infotype As Dynamic) As Integer
file/line: /tmp/plugin/OCAAAAxdFl4H/pkg:/source/regScreen.brs(124)
Function doregistration() As Integer
file/line: /tmp/plugin/OCAAAAxdFl4H/pkg:/source/regScreen.brs(35)
Function preshowhomescreen(breada As Dynamic, breadb As Dynamic) As Object
file/line: /tmp/plugin/OCAAAAxdFl4H/pkg:/source/appHomeScreen.brs(12)
Function main() As Void
file/line: /tmp/plugin/OCAAAAxdFl4H/pkg:/source/appMain.brs(20)
Local Variables:
infotype &h0002 Integer val:0
global &h0020 rotINTERFACE:ifGlobal
m &h0010 bsc:roAssociativeArray, refcnt=5
regdialog &h0010 bsc:roMessageDialog, refcnt=1
msg &h0000 <uninitialized> val:Uninitialized
button &h0000 <uninitialized> val:Uninitialized
isready &h0000 <uninitialized> val:Uninitialized
BrightScript Debugger> c
Current Function:
106: Function showRegDialog(infotype) As Integer
107: regDialog = createobject("roMessageDialog")
108: regDialog.setmessageport(createobject("roMessagePort"))
109: regDialog.enableoverlay(true)
110:
111: if (infotype = 0)
112: regDialog.setTitle("Supermediaplex")
113: regDialog.settext("Are you a Supermediaplex subscriber?")
114: regDialog.addbutton(0,"Yes")
115: regDialog.addbutton(1,"No")
116:
117: elseif (infotype = 1)
118: regDialog.setTitle("It's easy to get started.")
119: regDialog.settext("Go to your Internet browser and visit: WWW.SUPERMEDIAPLEX.COM")
120: regDialog.addbutton(0,"Done")
121: endif
122: regDialog.show()
123: while true
124: msg = wait(0,regDialog.getmessageport())
125: if msg.isscreenclosed() return -1
126: if msg.isButtonInfo() return -1 ' Info pressed again, dismiss the info overlay
127: if msg.isbuttonpressed() and infotype=0 then
128: button = msg.getindex()
129: print "Info Button ";button;" pressed"
130: if button = 1 then
131: isReady = ShowDialog2Buttons("Ready to get started?","","Yes","No")
132: if isReady = 0 then
133: showRegDialog(1)
134: endif
135: return 1
136: else
137: return 0
138: endif
139: elseif msg.isbuttonpressed() and infotype=1 then
140: return 1
141: endif
142: end while
143: end function
'Dot' Operator attempted with invalid BrightScript Component or interface refere
nce. (runtime error &hec) in ...l4H/pkg:/source/regScreen.brs(125)
125: if msg.isscreenclosed() return -1
Backtrace:
Function showregdialog(infotype As Dynamic) As Integer
file/line: /tmp/plugin/OCAAAAxdFl4H/pkg:/source/regScreen.brs(125)
Function doregistration() As Integer
file/line: /tmp/plugin/OCAAAAxdFl4H/pkg:/source/regScreen.brs(35)
Function preshowhomescreen(breada As Dynamic, breadb As Dynamic) As Object
file/line: /tmp/plugin/OCAAAAxdFl4H/pkg:/source/appHomeScreen.brs(12)
Function main() As Void
file/line: /tmp/plugin/OCAAAAxdFl4H/pkg:/source/appMain.brs(20)
Local Variables:
infotype &h0002 Integer val:0
global &h0020 rotINTERFACE:ifGlobal
m &h0010 bsc:roAssociativeArray, refcnt=5
regdialog &h0010 bsc:roMessageDialog, refcnt=1
msg &h0080 Invalid val:invalid
button &h0000 <uninitialized> val:Uninitialized
isready &h0000 <uninitialized> val:Uninitialized
BrightScript Debugger> c
Current Function:
106: Function showRegDialog(infotype) As Integer
107: regDialog = createobject("roMessageDialog")
108: regDialog.setmessageport(createobject("roMessagePort"))
109: regDialog.enableoverlay(true)
110:
111: if (infotype = 0)
112: regDialog.setTitle("Supermediaplex")
113: regDialog.settext("Are you a Supermediaplex subscriber?")
114: regDialog.addbutton(0,"Yes")
115: regDialog.addbutton(1,"No")
116:
117: elseif (infotype = 1)
118: regDialog.setTitle("It's easy to get started.")
119: regDialog.settext("Go to your Internet browser and visit: WWW.SUPERMEDIAPLEX.COM")
120: regDialog.addbutton(0,"Done")
121: endif
122: regDialog.show()
123: while true
124: msg = wait(0,regDialog.getmessageport())
125: if msg.isscreenclosed() return -1
126: if msg.isButtonInfo() return -1 ' Info pressed again, dismissthe info overlay
127: if msg.isbuttonpressed() and infotype=0 then
128: button = msg.getindex()
129: print "Info Button ";button;" pressed"
130: if button = 1 then
131: isReady = ShowDialog2Buttons("Ready to get started?","","Yes","No")
132: if isReady = 0 then
133: showRegDialog(1)
134: endif
135: return 1
136: else
137: return 0
138: endif
139: elseif msg.isbuttonpressed() and infotype=1 then
140: return 1
141: endif
142: end while
143: end function
Function Call Operator ( ) attempted on non-function. (runtime error &he0) in ..
.l4H/pkg:/source/regScreen.brs(125)
125: if msg.isscreenclosed() return -1
Backtrace:
Function showregdialog(infotype As Dynamic) As Integer
file/line: /tmp/plugin/OCAAAAxdFl4H/pkg:/source/regScreen.brs(125)
Function doregistration() As Integer
file/line: /tmp/plugin/OCAAAAxdFl4H/pkg:/source/regScreen.brs(35)
Function preshowhomescreen(breada As Dynamic, breadb As Dynamic) As Object
file/line: /tmp/plugin/OCAAAAxdFl4H/pkg:/source/appHomeScreen.brs(12)
Function main() As Void
file/line: /tmp/plugin/OCAAAAxdFl4H/pkg:/source/appMain.brs(20)
Local Variables:
infotype &h0002 Integer val:0
global &h0020 rotINTERFACE:ifGlobal
m &h0010 bsc:roAssociativeArray, refcnt=5
regdialog &h0010 bsc:roMessageDialog, refcnt=1
msg &h0080 Invalid val:invalid
button &h0000 <uninitialized> val:Uninitialized
isready &h0000 <uninitialized> val:Uninitialized
BrightScript Debugger>
The followings are lines 106 through 143 that contain the showRegDialog function:
Function showRegDialog(infotype) As Integer
regDialog = createobject("roMessageDialog")
regDialog.setmessageport(createobject("roMessagePort"))
regDialog.enableoverlay(true)
if (infotype = 0)
regDialog.setTitle("Photros")
regDialog.settext("Are you a Supermediaplex subscriber?")
regDialog.addbutton(0,"Yes")
regDialog.addbutton(1,"No")
elseif (infotype = 1)
regDialog.setTitle("It's easy to get started.")
regDialog.settext("Go to your Internet browser and visit: WWW.SUPERMEDIAPLEX.COM")
regDialog.addbutton(0,"Done")
endif
regDialog.show()
while true
msg = wait(0,regDialog.getmessageport())
if msg.isscreenclosed() return -1
if msg.isButtonInfo() return -1 ' Info pressed again, dismiss the info overlay
if msg.isbuttonpressed() and infotype=0 then
button = msg.getindex()
print "Info Button ";button;" pressed"
if button = 1 then
isReady = ShowDialog2Buttons("Ready to get started?","","Yes","No")
if isReady = 0 then
showRegDialog(1)
endif
return 1
else
return 0
endif
elseif msg.isbuttonpressed() and infotype=1 then
return 1
endif
end while
end function