Error: "call XBarClock's OnUpdate line: [string "?"]:26: attempt to index global 'os' (a nil value)"
The original code checks for os.-Fix namespaces but does not check the os table it really wants to index:
if osfix or d303Fix or ffp or (MorphClock and MorphClock:IsValid()) then XBar.Clock_OnUpdate(elapsedTime) end
The code fails when the user forgets to install any .os-Fix and has an addon installed that uses the MorphClock library, which after some seconds causes "MorphClock and MorphClock:IsValid()" to return true.
This code allows XBar to work with any os.-Fix and fixes the Problem with MorphClock.
if os -- is any os fix installed and (not MorphClock or os.time ~= MorphClock.time or MorphClock:IsValid()) -- MorphClock is NOT installed OR NOT the current os fix or it has a valid time then XBar.Clock_OnUpdate(elapsedTime) end
|Noguai||Aug 30, 2013 at 18:55 UTC||Create|