maihde
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2011
08:40 PM
roMessageDialog AddRatingButton doesn't send events
I'm trying to display an roMessageDialog that shows a rating button; however, when I do this changes to the rating do not trigger any events. Other buttons in the dialog do trigger events. Here is a snippet of what I'm trying to accomplish
Any thoughts about why the rating button is not triggering a message? I'm currently on firmware version 3.0 build 2227.
port = CreateObject("roMessagePort")
screen = CreateObject("roMessageDialog")
screen.SetMessagePort(port)
screen.EnableOverlay(true)
screen.SetMenuTopLeft(true)
screen.SetTitle("Change Rating")
screen.SetText("Some text")
screen.AddRatingButton(1, userRating, aggregateRating, "therating") ' this doesn't trigger a msg
screen.AddButton(2, "Btn2") ' triggers a msg
screen.AddButton(3, "Btn3") ' triggers a msg
screen.EnableBackButton(true)
screen.Show()
while true
msg = wait(0, port)
if msg <> invalid then
print type(msg); " "; msg.getIndex(); " "; msg.getData()
end if
end while
Any thoughts about why the rating button is not triggering a message? I'm currently on firmware version 3.0 build 2227.
5 REPLIES 5
renojim
Community Streaming Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2011
11:04 PM
Re: roMessageDialog AddRatingButton doesn't send events
Try adding:
-JT
screen.SetStaticRatingEnabled(false)
-JT
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.
maihde
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2011
05:43 AM
Re: roMessageDialog AddRatingButton doesn't send events
The SetStaticRatingEnabled isn't part of the ifMessageDialog interface, but I tried it anyways and here is the error message
The rating button works fine in roSpringBoard with or without the static rating enabled.
Member function not found in BrightScript Component or interface. (runtime error &hf4) in ...
264: screen.SetStaticRatingEnabled(false)
The rating button works fine in roSpringBoard with or without the static rating enabled.

gonzotek
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2011
06:59 AM
Re: roMessageDialog AddRatingButton doesn't send events
"maihde" wrote:
The SetStaticRatingEnabled isn't part of the ifMessageDialog interface, but I tried it anyways and here is the error message
Member function not found in BrightScript Component or interface. (runtime error &hf4) in ...
264: screen.SetStaticRatingEnabled(false)
The rating button works fine in roSpringBoard with or without the static rating enabled.
It sounds like a firmware bug, or bad documentation. From the beta 3.0 sdk Compenent Reference, under 4.10 roMessageDialog:
Boolean AddRatingButton(Integer id, Integer userRating,So your code appears correct and the button should be triggering an event, but isn't.
Integer aggregateRating, String tip)
Adds a star rating button to the dialog. The rating is specified as a string whose value is an integer 1-100 which indicates the number of stars (1 to 5) to be displayed. Think of this as a percentage value <20% = 1 star. This button is displayed in the menu area of the screen and appears in the order added. The userRating specifies the value the user rated the title, while the aggregate Rating represents the total for all users. The userRating takes precedence and determines the color of the buttons if set. The aggregateRating may display half-stars. The button returns the userRating in the event data field.
The rating widget is only allowed on message dialogs that call SetMenuTopLeft(true).
Remoku.tv - A free web app for Roku Remote Control!
Want to control your Roku from nearly any phone, computer or tablet? Get started at http://help.remoku.tv
by Apps4TV - Applications for television and beyond: http://www.apps4tv.com
Want to control your Roku from nearly any phone, computer or tablet? Get started at http://help.remoku.tv
by Apps4TV - Applications for television and beyond: http://www.apps4tv.com
maihde
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2011
05:35 PM
Re: roMessageDialog AddRatingButton doesn't send events
Yeah, I was expecting that to be the case 😞
I was hoping that there would be some clever workaround...oh well, I will switch to a springboard instead.
Thanks for the help!
I was hoping that there would be some clever workaround...oh well, I will switch to a springboard instead.
Thanks for the help!
renojim
Community Streaming Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2011
06:07 PM
Re: roMessageDialog AddRatingButton doesn't send events
Sorry, I missed the part about it being a message dialog.
It looks like it's another bug in v3.0 b2227. It works in v4 of the firmware.
-JT
It looks like it's another bug in v3.0 b2227. It works in v4 of the firmware.
-JT
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.