API Changed in SetFont ?
Hi all,
the next error I am trying to fix is this. This happens when I try to change fonts attributes calling the function in this way: Lua Code:
The error is this: Lua Code:
It should be that the fonts names are not global anymore ? Thanks for any advices |
I have tried also to change the function in this way (taken by Phanx addon):
Lua Code:
But I got: Lua Code:
Thanks again. |
Code:
SetFont("AchievementFont_Small",GMFONTS["B"], 12) Code:
SetFont(Frame.FontStringWidget, "AchievementFont_Small",GMFONTS["B"], 12) |
Nah, he's using colon notation. That part's good.
Are you sure the object you're passing through is actually a fontstring, though? |
Code:
Locals: |
Hi all.
In this moment I am not sure of anything :) , I know only that it is used to work before 9.0.x :) I have a list like: Lua Code:
For this I was asking if the fonts name where changed in the globals. Thanks again for the attention. |
Hi all again.
Fonts are working now. I have changed the function call to: Lua Code:
and it seems to work :) Now I have to fix another iussue in PhanxConfig-Dropdown that seems to use a frame with a SetBackdrop. Ahhh it will be a long night :) |
Tied myself up overthinking with the first example code use of passing in a string.
/run print(FriendsFont_Large.SetFont) works in-game. |
Found and fixed ... it was easy now that Fizzlemizz points out to the file of changes from 8.x to 9.x :)
Lua Code:
Thanks again. |
Quote:
That code works from so long ago. It was taken from "Tectiles" by tekkub and I never changed so much ... It is strange but using the _G fixes the code. Why it works in game and not in my addon is a mistery. :) But today I am no longer surprised by anything :) Thanks again Fizzlemizz |
Explaining the error is a little complex, but passing a string to your function made the call end up like this.
Code:
("AchievementFont_Small"):SetFont(GMFONTS["B"],12) Code:
string.SetFont("AchievementFont_Small",GMFONTS["B"],12) |
Thanks for the explanation SDPhantom.
Now I understand a little bit more this error :) But this behaviour didn't happen before ? It is changed in 9.0.x ? Thanks ! :) |
Quote:
|
Quote:
|
All times are GMT -6. The time now is 03:18 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI