139 - Grid is updating fonts registered with SML incorrectly
This is happening in the latest Grid, just downloaded it 10 minutes ago. Basically, when a new font is registered with SML and LibSharedMedia_Update fires, you are only passing the font path and not the size causing an error at line #391 in GridFrame.lua.
Replacing the GridFrame:LibSharedMedia_Update function on line #1128 in GridFrame.lua with the below fixes the issue.
function GridFrame:LibSharedMedia_Update(callback, type, handle) if type == "font" then self:WithAllFrames(function (f) f:SetFrameFont(media:Fetch("font", self.db.profile.font), self.db.profile.fontSize) end) elseif type == "statusbar" then self:WithAllFrames(function (f) f:SetFrameTexture(media:Fetch("statusbar", self.db.profile.texture)) end) end end
| User | When | Change |
|---|---|---|
| Pastamancer | Tue, 11 Aug 2009 19:23:15 | Changed status from New to Fixed |
| Arrowmaster | Sat, 20 Jun 2009 05:59:36 | Changed description type from Plain Text to WikiCreole Changed description: Replacing the GridFrame:LibSharedMedia_Update function on line #1128 in GridFrame.lua with the below fixes the issue. + <<code lua>> - function GridFrame:LibSharedMedia_Update(callback, type, handle) + function GridFrame:LibSharedMedia_Update(callback, type, handle) - if type == "font" then + if type == "font" then - self:WithAllFrames(function (f) f:SetFrameFont(media:Fetch("font", self.db.profile.font), self.db.profile.fontSize) end) + self:WithAllFrames(function (f) f:SetFrameFont(media:Fetch("font", self.db.profile.font), self.db.profile.fontSize) end) - elseif type == "statusbar" then + elseif type == "statusbar" then - self:WithAllFrames(function (f) f:SetFrameTexture(media:Fetch("statusbar", self.db.profile.texture)) end) + self:WithAllFrames(function (f) f:SetFrameTexture(media:Fetch("statusbar", self.db.profile.texture)) end) end - end + end + <</code>> - - Since some of the syntax seems to be getting removed or whatever, http://shadowed.pastey.net/115203 is the unedited one. |
| Shadowed | Mon, 01 Jun 2009 15:04:47 | Changed description: self:WithAllFrames(function (f) f:SetFrameTexture(media:Fetch("statusbar", self.db.profile.texture)) end)
end
end
+
+ Since some of the syntax seems to be getting removed or whatever, http://shadowed.pastey.net/115203 is the unedited one. |
| Shadowed | Mon, 01 Jun 2009 15:02:41 | Changed description type from Textile to Plain Text Changed description: Replacing the GridFrame:LibSharedMedia_Update function on line #1128 in GridFrame.lua with the below fixes the issue. - @ function GridFrame:LibSharedMedia_Update(callback, type, handle) + function GridFrame:LibSharedMedia_Update(callback, type, handle) if type == "font" then self:WithAllFrames(function (f) f:SetFrameFont(media:Fetch("font", self.db.profile.font), self.db.profile.fontSize) end) elseif type == "statusbar" then self:WithAllFrames(function (f) f:SetFrameTexture(media:Fetch("statusbar", self.db.profile.texture)) end) end end - @ |
| Shadowed | Sat, 30 May 2009 21:12:10 | Create |
- 2 comments
- 2 comments
Facts
- Last updated on
- 11 Aug 2009
- Reported on
- 30 May 2009
- Status
- Fixed - Developer made requested changes. QA should verify.
- Type
- Defect - A shortcoming, fault, or imperfection
- Priority
- Medium - Normal priority.
- #2
Xara Thu, 30 Jul 2009 12:11:24Grid Version r1200
Without savedvariables/grid.lua I still get this error every time a profile is loaded:
Interface\AddOns\Grid\GridFrame.lua:407: Usage: <unnamed>:SetFont("font", fontHeight [, flags])
see you
- #1
gnarfoz Sat, 20 Jun 2009 05:58:01The provided fix works flawlessly for me. :)