renojim
Community Streaming Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2017
11:46 PM
Re: Member function not found in BrightScript Component or interface.
I'm guessing you want:
screen.SetContentList(contentList)
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.

Komag
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2017
02:19 PM
Re: Member function not found in BrightScript Component or interface.
Indeed, roPosterScreen doesn't have SetContent(), only SetContentList()
https://sdkdocs.roku.com/display/sdkdoc/ifPosterScreen
https://sdkdocs.roku.com/display/sdkdoc/ifPosterScreen
Blackhawk
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2017
06:48 PM
Re: Member function not found in BrightScript Component or interface.
I tried the same with my movie menu
Yet this error keeps showing up
Member function not found in BrightScript Component or interface. (runtime error
&hf4) in pkg:/source/Movies.brs(19)
019: screen.SetContentList(InitMovieList())
Function ShowMovieMenu() as integer
screen = CreateObject("roGridScreen")
port = CreateObject("roMessagePort")
screen.SetMessagePort(port)
screen.SetBreadcrumbText("Movie", "Full Menu")
screen.SetContentList(InitMovieList())
screen.SetFocusedListItem(2)
screen.Show()
while (true)
msg = wait(0, port)
if type(msg) = "roGridScreenEvent"
if (msg.isScreenClosed())
return -1
else if (msg.isListItemSelected())
ShowMovieDetailsScreen( msg.GetIndex() )
endif
endif
end while
End Function
Function ShowMovieDetailsScreen(index as integer) as integer
print "Selected Index: " + Stri(index)
detailsScreen = CreateObject("roSpringboardScreen")
port = CreateObject("roMessagePort")
detailsScreen.SetMessagePort(port)
detailsScreen.SetDescriptionStyle("generic")
detailsScreen.SetBreadcrumbText("Movies", m.options[index].Description)
detailsScreen.SetStaticRatingEnabled(false)
details = {
HDPosterUrl: m.options[index].HDPosterURL
SDPosterUrl: m.options[index].SDPosterURL
Description: m.options[index].Description
}
detailsScreen.SetContent(details)
detailsScreen.AddButton(1, "Play Movie")
detailsScreen.show()
while (true)
msg = wait(0, port)
if type(msg) = "roSpringboardScreenEvent"
if (msg.isScreenClosed())
return -1
else if (msg.isButtonPressed())
MovieDetailsScreenButtonClicked( msg.GetIndex() )
endif
endif
end while
End Function
Function MovieDetailsScreenButtonClicked(index as integer) as void
dialog = CreateObject("roOneLineDialog")
if (index = 1)
PlayVideo()
endif
dialog.ShowBusyAnimation()
dialog.show()
Sleep(4000)
End Function
'********************************************************************
'** Given the category from the filter banner, return an array
'** of ContentMetaData objects (roAssociativeArray's) representing
'** the shows for the category. For this example, we just cheat and
'** create and return a static array with just the minimal items
'** set, but ideally, you'd go to a feed service, fetch and parse
'** this data dynamically, so content for each category is dynamic
'********************************************************************
Function InitMovieList(category As Object) As Object
m.options = [
{
Title: category + ": Unit Bryan",
releaseDate: "",
rating: "",
Description:"A short film about bored, aimless retail store employee, Robin, who has been tasked with training the stores new employee, a friendly worker robot. Reluctant to work alongside this new machine at first, Robin forms an unlikely bond with it, leading her to make some life changing decisions.",
HDPosterUrl:"",
SDPosterUrl:"",
StarRating:100
}
{
Title: category + ": ZERO-DAY",
releaseDate: "",
rating: "",
Description:"After the success of STUXNET, a virus written by the United States to destroy Iranian uranium enrichment facilities, the U.S. government could no longer deny it was developing cyber weapons meant to do physical damage. With US companies and agencies under constant attack from state-sponsored Chinese hackers, it is only a matter of time before tensions boil over and more sensitive infrastructure is targeted. As more of our devices (cars, homes, etc) become connected, we will become more and more vulnerable to the physical threat of cyber warfare.",
HDPosterUrl:"",
SDPosterUrl:"",
StarRating:100
}
]
return m.options
End Function
Yet this error keeps showing up
Member function not found in BrightScript Component or interface. (runtime error
&hf4) in pkg:/source/Movies.brs(19)
019: screen.SetContentList(InitMovieList())
Tajson
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2017
07:21 PM
Re: Member function not found in BrightScript Component or interface.
"Blackhawk" wrote:
I tried the same with my movie menu
Yet this error keeps showing up
Member function not found in BrightScript Component or interface. (runtime error
&hf4) in pkg:/source/Movies.brs(19)
019: screen.SetContentList(InitMovieList())
This is different so it is not the same as the previous issue.

RokuMarkn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2017
12:39 PM
Re: Member function not found in BrightScript Component or interface.
You've declared InitMovieList to take one parameter but you're calling it with no parameters.
--Mark
--Mark
belltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2017
04:46 PM
Re: Member function not found in BrightScript Component or interface.
and ifGridScreen.SetContentList takes 2 parameters, which is what the error you're getting is referring to.
- « Previous
-
- 1
- 2
- Next »