Forum Discussion

jedashford's avatar
jedashford
Channel Surfer
10 years ago

How do I set an Observer for Poster.loadStatus?

From the docs (https://sdkdocs.roku.com/display/sdkdoc/Poster) it states that "loadStatus" is:
"Read-Only - Can be used to track the progress of loading the graphical image file. A typical use of this field is to set an observer so that when the field value changes to ready, an action can be triggered."

I set an observer here on that loadStatus value, but the method is never called.

m.backgroundPoster.ObserveField("loadStatus", backgroundImageProgress)


I'm guessing I'm observing this incorrectly. Any insights?

2 Replies

  • The second parameter of the observeField() method should be a string. Try this instead:
    m.backgroundPoster.ObserveField("loadStatus", "backgroundImageProgress")
  • Ugh. You're spot on. Works now. :? :? :? :? :?

    Too many languages and syntax floating around in the ol' brain. Thank you.