Forum Discussion
asrikanth1990
8 years agoVisitor
The solution might not work in my situation.
We have two files: measure.brs and timertask.xml as our end product
Timertask is part of one of measure.brs for initiating a timer and call a method periodically.
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco} span.s1 {color: #3f7777}
m.Timer = m.top.findNode("timerTask")
and i am sending object to timer in following way
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3629d2} span.s1 {color: #3629d2} span.s2 {color: #3f7777} span.s3 {color: #000000}
initTimers = function()
m.doUpdate()
m.doSync()
m.timer.setField("test",m)
m.timer.control = "RUN"
end function
and inside timer if i try to access m.top.test.doupdate() I am getting invalid -p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco}
Member function not found in BrightScript Component or interface. (runtime error &hf4) in pkg:/components/timerTask.xml(22)
I have two questions.
Can i have a timer run in same file without help of task. Will i be able to run it in background thread (i Think No)
Is there a way we can pass member functions into task
Thanks
Srikanth
We have two files: measure.brs and timertask.xml as our end product
Timertask is part of one of measure.brs for initiating a timer and call a method periodically.
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco} span.s1 {color: #3f7777}
m.Timer = m.top.findNode("timerTask")
and i am sending object to timer in following way
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3629d2} span.s1 {color: #3629d2} span.s2 {color: #3f7777} span.s3 {color: #000000}
initTimers = function()
m.doUpdate()
m.doSync()
m.timer.setField("test",m)
m.timer.control = "RUN"
end function
and inside timer if i try to access m.top.test.doupdate() I am getting invalid -p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco}
Member function not found in BrightScript Component or interface. (runtime error &hf4) in pkg:/components/timerTask.xml(22)
I have two questions.
Can i have a timer run in same file without help of task. Will i be able to run it in background thread (i Think No)
Is there a way we can pass member functions into task
Thanks
Srikanth