Forum Discussion

squirreltown's avatar
squirreltown
Roku Guru
8 years ago

8.1/8.0 fields

What has changed in 8.1 regarding observe field firing functions?
This is a screensaver clock that works in 8.0.x but fails to fire the "OnTimeChanged" function in 8.1 ( Roku 4640X)

Sub Runscreensaver()
m.global = screen.getGlobalNode()
  m.global.AddField("timex", "string", false)
    m.global.timex= ""
while true
   m.global.timex=gettime()
end while
end sub

'screensaver'
Function init() 
    m.global.observeField("timex", "onTimeChanged")
 end Function
 
 'XML'

<interface>
    <field id="timex" type="string" alwaysNotify="true" onChange="OnTimeChanged" />
</interface>
No RepliesBe the first to reply