문제

I am trying to store a session cookie for google analytics

This is the code

if valid(m.GATracker.Cookie) then
    print "Cookie:"; m.GATracker.Cookie
else
    m.GATracker.Cookie = 'Random Cookie Number
end if

every time I hit the function with this code a new cookie is generated. I thought m. was how you stored variables

도움이 되었습니까?

해결책

Well that depends on where this code comes from. You need to paste a bigger segment.

In a global function, m is the same as getGlobalAA() - but inside a method (that is "a function belonging to a dictionary" in brightscript), m actually points to the object itself (i.e. this or self equivalent).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top