Where did my stars go?

I have an interesting situation that popped-up. This has happened to me before in other ways with other functions, but it’s been hard to isolate a test-case.

Basically if I cook the value that we use (0-5, floating point) into the string value of stars “0-100”, even though the string is right, even if I box it in an roString or use the String primative… a zero still shows-up.

I can work-around this, but… any ideas?


Function Main()
    port = CreateObject("roMessagePort")
    springBoard = CreateObject("roSpringboardScreen")
    springBoard.SetBreadcrumbText("[location 1]", "[location2]")
    springBoard.SetMessagePort(port) 
    o = CreateObject("roAssociativeArray")
    o.ContentType = "episode"
    o.Title = "[Title]"
    o.ShortDescriptionLine1 = "[ShortDescriptionLine1]"
    o.ShortDescriptionLine2 = "[ShortDescriptionLine2]"
    o.Description = ""
    For i = 1 To 15 
        o.Description = o.Description + "[Description] "
    End For
    o.SDPosterUrl = ""
    o.HDPosterUrl = ""
    o.Rating = "NR"
    myRating = "4.0"
    converted = val(myRating) * 20
    finalRating = stri(converted)
    o.StarRating = finalRating
    o.ReleaseDate = "[mm/dd/yyyy]"
    o.Length = 5400
    o.Categories = CreateObject("roArray", 10, true) 
    o.Categories.Push("[Category1]")
    o.Categories.Push("[Category2]")
    o.Categories.Push("[Category3]")
    o.Actors = CreateObject("roArray", 10, true)
    o.Actors.Push("[Actor1]")
    o.Actors.Push("[Actor2]")
    o.Actors.Push("[Actor3]")
    o.Director = "[Director]"
    springBoard.SetContent(o)
    springBoard.Show() 
    While True
        msg = wait(0, port)
        If msg.isScreenClosed() Then
            Return -1
        Else if msg.isButtonPressed() 
            print "msg: "; msg.GetMessage(); "idx: "; msg.GetIndex()
        End if
    End While
End Function

Doesn’t show my stars.

This does, however.


Function Main()
    port = CreateObject("roMessagePort")
    springBoard = CreateObject("roSpringboardScreen")
    springBoard.SetBreadcrumbText("[location 1]", "[location2]")
    springBoard.SetMessagePort(port) 
    o = CreateObject("roAssociativeArray")
    o.ContentType = "episode"
    o.Title = "[Title]"
    o.ShortDescriptionLine1 = "[ShortDescriptionLine1]"
    o.ShortDescriptionLine2 = "[ShortDescriptionLine2]"
    o.Description = ""
    For i = 1 To 15 
        o.Description = o.Description + "[Description] "
    End For
    o.SDPosterUrl = ""
    o.HDPosterUrl = ""
    o.Rating = "NR"
    o.StarRating = "80"
    o.ReleaseDate = "[mm/dd/yyyy]"
    o.Length = 5400
    o.Categories = CreateObject("roArray", 10, true) 
    o.Categories.Push("[Category1]")
    o.Categories.Push("[Category2]")
    o.Categories.Push("[Category3]")
    o.Actors = CreateObject("roArray", 10, true)
    o.Actors.Push("[Actor1]")
    o.Actors.Push("[Actor2]")
    o.Actors.Push("[Actor3]")
    o.Director = "[Director]"
    springBoard.SetContent(o)
    springBoard.Show() 
    While True
        msg = wait(0, port)
        If msg.isScreenClosed() Then
            Return -1
        Else if msg.isButtonPressed() 
            print "msg: "; msg.GetMessage(); "idx: "; msg.GetIndex()
        End if
    End While
End Function

What gives?