Showing results 1 to 25 of 500
Search took 0.07 seconds.
Search: Posts Made By: Phanx
Forum: Lua/XML Help Yesterday, 08:15 PM
Replies: 3
Views: 83
Posted By Phanx
Also, for the purposes of simple "if x then"...

Also, for the purposes of simple "if x then" checks in Lua, a value of false is the same as "not existing" or having a value of nil.

a = b or c

... is the same as:

a = (b ~= nil and b ~= false)...
Forum: Lua/XML Help Yesterday, 08:04 PM
Replies: 30
Views: 1,659
Posted By Phanx
That's not a very good excuse for using values...

That's not a very good excuse for using values that are techinically wrong. While the WoW API will auto-correct "TopLeft" to "TOPLEFT" when you pass that wrong value into eg. SetPoint, the value you...
Forum: Lua/XML Help 07-10-14, 05:15 PM
Replies: 30
Views: 1,659
Posted By Phanx
Why bother checking whether the corner resizers...

Why bother checking whether the corner resizers were already created, when the function will only run once per frame anyway? And if you're intending for the function to be able to run multiple times...
Forum: AddOn Search/Requests 07-10-14, 04:54 PM
Replies: 13
Views: 541
Posted By Phanx
getglobal(x) doesn't just essentially return...

getglobal(x) doesn't just essentially return _G[x] -- it literally does that:


function getglobal(varr)
return _G[varr];
end


It's defined in FrameXML/UIParent.lua...
Forum: AddOn Search/Requests 07-10-14, 11:25 AM
Replies: 13
Views: 541
Posted By Phanx
The last official version I could find was...

The last official version I could find was released in 2006, and was still using RegisterForSave, so I'd say the answer to your question is a resounding no. :p
Forum: oUF (Otravi Unit Frames) 07-10-14, 11:19 AM
Replies: 7
Views: 249
Posted By Phanx
Rainrider already explained most of it,...

Rainrider already explained most of it, but:



Well, those lines are required for oUF_Phanx to run, because other code inside oUF_Phanx expects those variables to exist, and uses them to pass...
Forum: Tutorials & Other Helpful Info. 07-09-14, 07:18 AM
Replies: 23
Views: 2,047
Posted By Phanx
Most of them were already 1/nil so if you weren't...

Most of them were already 1/nil so if you weren't employing the Gratuitous Overuse of Explicit Checks on Boolean Values(tm) technique, then you shouldn't have much work to do. :p
Forum: oUF (Otravi Unit Frames) 07-09-14, 07:09 AM
Replies: 7
Views: 249
Posted By Phanx
In your first snippet (the one giving you an...

In your first snippet (the one giving you an error):


local _, ns = ...
local _, playerClass = UnitClass("player")
local colors = oUF.colors
local config
-- ^ Your code doesn't use any of these...
Forum: UI Screenshots, Feedback and Design Discussion 07-05-14, 10:08 PM
Replies: 40
Views: 3,201
Posted By Phanx
Well, your realm name hiding function doesn't...

Well, your realm name hiding function doesn't work because it just returns some values, and you're not actually doing anything with those values. You're not even calling the function in the same...
Forum: AddOn Help/Support 07-05-14, 09:45 PM
Replies: 6
Views: 322
Posted By Phanx
You shouldn't need to manually trigger garbage...

You shouldn't need to manually trigger garbage collection. Lua will run it periodically on its own. If you're seeing your memory usage growing so fast that manually running garbage collection is...
Forum: Lua/XML Help 07-04-14, 05:23 AM
Replies: 7
Views: 295
Posted By Phanx
To elaborate, naming the variable _ doesn't...

To elaborate, naming the variable _ doesn't actually do anything that naming it selected or NYAN_CAT or anything else does; it's just a programmer's naming convention. If you're only going to use the...
Forum: AddOn Search/Requests 07-02-14, 02:51 AM
Replies: 5
Views: 269
Posted By Phanx
Are you looking for an action bar addon that you...

Are you looking for an action bar addon that you can just install and use? Or are you looking for information on how to write an addon that creates action buttons?
Forum: Lua/XML Help 07-01-14, 02:47 AM
Replies: 8
Views: 300
Posted By Phanx
If you just want to show the orb icons somewhere...

If you just want to show the orb icons somewhere else, I'd recommend you do this instead of what you're currently doing (and also instead of what I previously posted):


-- 1. Detach the chi frame...
Forum: AddOn Help/Support 07-01-14, 12:01 AM
Replies: 15
Views: 531
Posted By Phanx
Avoid infinite loops, and "action blocked in...

Avoid infinite loops, and "action blocked in combat" errors:


local moving

hooksecurefunc(CharacterMicroButton, "SetPoint", function(self)
if moving or InCombatLockdown() then return end
moving =...
Forum: Lua/XML Help 06-30-14, 11:56 PM
Replies: 8
Views: 300
Posted By Phanx
None of the monk harmony bar's children have any...

None of the monk harmony bar's children have any events registered on them, so I don't really know what you're doing there. You also don't need to wait for any events, since all of the FrameXML code...
Forum: AddOn Help/Support 06-29-14, 06:09 AM
Replies: 3
Views: 403
Posted By Phanx
Replace the Core.lua file with the attached one....

Replace the Core.lua file with the attached one. It's completely untested, so you may want to back up your saved variables before using it.
Forum: oUF (Otravi Unit Frames) 06-29-14, 01:41 AM
Replies: 1
Views: 194
Posted By Phanx
There is already an open bug report ticket about...

There is already an open bug report ticket about that:
http://www.wowinterface.com/portal.php?id=224&a=viewbug&bugid=8106

However, I have never been able to reproduce this problem, so until someone...
Forum: AddOn Help/Support 06-25-14, 01:25 AM
Replies: 4
Views: 336
Posted By Phanx
Don't forget Blizzard_RaidUI ... and that macro...

Don't forget Blizzard_RaidUI ... and that macro would be shorter without the gratuitous table creation and pairs usage. :(

/run EnableAddOn("Blizzard_CompactRaidFrames")...
Forum: AddOn Help/Support 06-23-14, 11:14 PM
Replies: 4
Views: 336
Posted By Phanx
Most likely some addon has disabled the Blizzard...

Most likely some addon has disabled the Blizzard addons that provide the default UI's compacty party and raid frames. You can't turn them back on via the addon list, but you can turn them on by...
Forum: oUF (Otravi Unit Frames) 06-23-14, 12:03 PM
Replies: 2
Views: 199
Posted By Phanx
I'd guess that the specific colors you listed...

I'd guess that the specific colors you listed aren't defined in oUF by default because Blizzard doesn't provide any default values for those colors, because all the default UI textures that are used...
Forum: AddOn Help/Support 06-23-14, 05:37 AM
Replies: 9
Views: 397
Posted By Phanx
Just remove the linebreaks if that's...

Just remove the linebreaks if that's required:

function(unit, cache, textframe) local _, name = GetSpecializationInfo(GetSpecialization()) return name end

For other units:

function(unit, cache,...
Forum: AddOn Help/Support 06-22-14, 01:34 AM
Replies: 9
Views: 397
Posted By Phanx
Don't use select. It's just a waste of CPU...

Don't use select. It's just a waste of CPU time.

local _, name = GetSpecializationInfo(GetSpecialization())
return name
Forum: AddOn Search/Requests 06-21-14, 11:59 AM
Replies: 12
Views: 851
Posted By Phanx
Again, not tested, but try adding this to the...

Again, not tested, but try adding this to the bottom of the previous code:


local searchPattern = strsub(FACTION_STANDING_CHANGED, "%%%d?$?s", "(.+)")
local swapResults =...
Forum: Tutorials & Other Helpful Info. 06-20-14, 11:31 PM
Replies: 23
Views: 2,047
Posted By Phanx
Organizational purposes, I'd guess is the primary...

Organizational purposes, I'd guess is the primary reason. This way they can put all the mount journal functions in a single global (the C_MountJournal table), rather than making them all globals in...
Forum: Lua/XML Help 06-20-14, 08:29 PM
Replies: 2
Views: 425
Posted By Phanx
You can take a look at oUF to see how it handles...

You can take a look at oUF to see how it handles hiding the Blizzard unit frames. Specifically, it re-parents the frames to a hidden frame so they don't re-appear, and also unregisters events from...
Showing results 1 to 25 of 500