我试着显示一个对话框。我在Roku中创建了一个普通应用程序。在主场景中,随着场景扩展,我在主场景中创建了一个子场景,并试图显示对话框,也尝试在一个子场景中进行场景扩展,并使用组件名进行扩展。在这里,我试着提到贝洛依三种场景。第一个场景工作,但有两个场景生成接口,而不是成员。我需要在子组件或组件中使用对话框。有什么解决办法吗。
第一个场景:
main.xml
<component name="RokuApp" extends="Scene">
</component>
在对话框逻辑下面
main.brs
sub init()
dialog = createObject("roSGNode", "Dialog")
dialog.backgroundUri = "pkg:/images/rsgde_dlg_bg_hd.9.png"
dialog.title = "Example Dialog"
dialog.optionsDialog = true
dialog.message = "Press * To Dismiss"
m.top.dialog = dialog
end init()
第二个场景:
main.xml在创建一个儿童节点/另一个XML中,并与Roku应用程序结合。
Child.xml
<component name="Child" extends="Group">
</component>
Child.brs
sub init()
dialog = createObject("roSGNode", "Dialog")
dialog.backgroundUri = "pkg:/images/rsgde_dlg_bg_hd.9.png"
dialog.title = "Example Dialog"
dialog.optionsDialog = true
dialog.message = "Press * To Dismiss"
m.top.dialog = dialog ' ' Interface not a member of BrightScript Component (runtime error &hf3)
end init()
第三种场景:
main.xml在创建一个组件/另一个XML中,并与Roku结合。
Component.xml
<component name="Component" extends="RowList">
</component>
Component.brs
sub init()
dialog = createObject("roSGNode", "Dialog")
dialog.backgroundUri = "pkg:/images/rsgde_dlg_bg_hd.9.png"
dialog.title = "Example Dialog"
dialog.optionsDialog = true
dialog.message = "Press * To Dismiss"
m.top.dialog = dialog ' Interface not a member of BrightScript Component (runtime error &hf3)
end init()
但是,在这里,最重要的是,这三种场景只随着场景的扩展而正常工作。在另一种情况下,这两种情况都生成错误接口,而不是BrightScript组件(运行时错误&hf3)的成员,任何人都知道该解决方案。
发布于 2019-12-30 05:05:12
只有场景节点有一个名为“对话框”的字段。Group和RowList没有一个名为“对话框”的字段。
https://stackoverflow.com/questions/59283259
复制相似问题