Well, I'm still trying to figure this out... the trouble started when I switched this:
function initplayer()
m.isplaying=false
m.ispaused=false
m.audioplayer=createobject("roaudioplayer")
'm.audioplayer.addheader("x-roku-reserved-dev-id","")
m.historyList=createobject("roarray",9,true)
end function
to this:
sub main()
glob=initplayer()
moduleone()
end sub
function initplayer() as object
return {isplaying:false,ispaused:false,audioplayer:createobject("roaudioplayer"),historylist:createobject("roarray",9,true)}
end function
then when I call:
moduleone()
modobj=initobj()
I no longer have m.audioplayer or any other m variable.
Every function I call: modobj.funcname()
used to have m referencing modobj, now it references nothing...
I switched it back, and everything is working, but I don't really understand why glob doesn't translate to m in moduleone() and modobj doesn't translate to m in functions called from modobj.funcname()
shouldn't any function called as a method of an object reference that object as m? That was working before I made the switch. Shouldn't a function called from that function reference the preceding function as m and include both parent functions in the cumulative list of globals?
- Joel
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!