Forum Discussion

mape's avatar
mape
Visitor
9 years ago

Creating RAF instance - in Task and not

Hello and greetings.

I try to use RAF. 

When I invoke Roku_Ads() in the main thread (main.brs -> showChannelSGScreen () ) , RAF instance created fine, all methods on-the-place:
{
    adpodcache: invalid
    adpodcacheupdated: false
    adurl: ""
    clearadbufferscreenlayers: <Function: roku_ads_clearadbufferscreenlayers>
    drawadbufferingprogressbar: <Function: roku_ads_drawadbufferingprogressbar>
    enableadbuffermessaging: <Function: roku_ads_enableadbuffermessaging>
    enablegarbagecollection: <Function: roku_ads_enablegarbagecollection>
    enablenielsendar: <Function: roku_ads_enablenielsendar>
...


But, the I create in in the Task, all methods are invalid:
{
    adpodcache: invalid
    adpodcacheupdated: false
    adurl: ""
    clearadbufferscreenlayers: invalid
    drawadbufferingprogressbar: invalid
    enableadbuffermessaging: invalid
    enablegarbagecollection: invalid
    enablenielsendar: invalid


Why? Where is a problem?

The code in the Task, if it is useful:
sub createAds()
    m.top.ads = Roku_Ads()
end sub

Where 'ads' definition is:
<interface>
<field id="ads" type="assocarray" />
</interface>

12 Replies