Posted: Sat Jan 07, 2017 9:53 pm Post subject: MemoryRecord Collapsed
I'm getting strange results with Collapsed.
Code:
{$lua}
[ENABLE]
local scriptmr = getAddressList().getMemoryRecordByID(1439)
local mr = getAddressList().createMemoryRecord()
mr.appendToEntry(scriptmr)
mr.Description = "ID: " .. mr.ID
mr.Options = "[moAllowManualCollapseAndExpand,moManualExpandCollapse]"
local pr = getAddressList().createMemoryRecord()
pr.Description = "Test"
pr.appendToEntry(mr)
local xr = getAddressList().createMemoryRecord()
xr.Description = "Test"
xr.appendToEntry(pr)
mr.Collapsed = true
local t = createTimer()
t.Interval = getFreezeTimer().Interval
print("Collapsed -> " .. tostring(mr.Collapsed))
t.OnTimer = function()
print("Collapsed -> " .. tostring(mr.Collapsed))
t.Destroy()
end
[DISABLE]
When I edit the script and click ok, everything works as expected, I get
Code:
Collapsed -> true
Collapsed -> true
But if i do it from activation, I get
Code:
Collapsed -> true
Collapsed -> false
Some how when you check the script from the table entry it starts as collapsed and then turns itself off for some reason. This doesn't happen when I edit the script and click ok (executing the syntax check).
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum