Ok, some more info. I've managed to get my aboutUs.brs called from the poster screen. But I get errors in the debugger.
Here is the code for aboutUs.brs:
Function preShowParagraphScreen(breadA=invalid, breadB=invalid) As Object
print "In preShowParagraphScreen"
port=CreateObject("roMessagePort")
screen = CreateObject("roParagraphScreen")
screen.SetMessagePort(port)
return screen
End Function
Function ShowParagraphScreen() As Void
print "In ShowParagraphScreen"
port = CreateObject("roMessagePort")
screen = CreateObject("roParagraphScreen")
screen.SetMessagePort(port)
screen.SetTitle("[Screen Title]")
screen.AddHeaderText("[Header Text]")
screen.AddParagraph("[Paragraph text 1 - Text in the paragraph screen is justified to the right and left edges]")
screen.AddParagraph("[Paragraph text 2 - Multiple paragraphs may be added to the screen by simply making additional calls]")
screen.AddButton(1, "[button text 1]")
screen.AddButton(2, "[button text 2]")
screen.Show()
while true
msg = wait(0, screen.GetMessagePort())
if type(msg) = " roParagraphScreenEvent"
exit while
endif
end while
End Function
Sub DoAboutUs(from as string)
print "In AboutUs.brs!"
screen=preShowParagraphScreen("Paragraph", "")
if screen=invalid then
print "unexpected error in preShowHomeScreen"
return
end if
ShowParagraphScreen(screen)
End Sub
And this is the error in the debugger when I select the poster that calls aboutUs.brs:
list selected: 3
In AboutUs.brs!
In preShowParagraphScreen
BrightScript Micro Debugger.
Enter any BrightScript statement, debug commands, or HELP.
Current Function:
029: Sub DoAboutUs(from as string)
030: print "In AboutUs.brs!"
031: screen=preShowParagraphScreen("Paragraph", "")
032: if screen=invalid then
033: print "unexpected error in preShowHomeScreen"
034: return
035: end if
036: ShowParagraphScreen(screen)
037: End Sub
/tmp/plugin/HKAAAAVJD8RP/pkg:/source/AboutUs.brs(36): runtime error f1: Wrong number of function parameters.
036: ShowParagraphScreen(screen)
Backtrace:
Function doaboutus(from As String) As Void
Function main() As Void
Local Variables:
from &h44 String val:Categories
global &h07 rotINTERFACE:ifGlobal
m &h06 bsc:roAssociativeArray, refcnt=3
screen &h16 bsc:roParagraphScreen, refcnt=1
BrightScript Debugger>
Any ideas?
Thanks,
Manuel.-