Showing results 1 to 8 of 8
Search took 0.00 seconds.
Search: Posts Made By: Phanx
Forum: Lua/XML Help 11-03-14, 08:40 PM
Replies: 31
Views: 11,646
Posted By Phanx
Clearly you're missing my point, and also the...

Clearly you're missing my point, and also the point of this thread -- which is about which variables must be global under the WoW addon system, which nothing you've posted has been related to -- so...
Forum: Lua/XML Help 11-03-14, 07:21 PM
Replies: 31
Views: 11,646
Posted By Phanx
I was addressing this: They're not the same....

I was addressing this:



They're not the same. You've just written a bunch of bloated metatable hacks to make them act like they're the same, and this is what I'm saying is absolutely pointless, and...
Forum: Lua/XML Help 11-03-14, 10:18 AM
Replies: 31
Views: 11,646
Posted By Phanx
Yes, but for all practical purposes, they are two...

Yes, but for all practical purposes, they are two different objects in Lua:


local t = {}
local f = CreateFrame("Frame")
print(t == f)


That will print "false" even after all you apply all your...
Forum: Lua/XML Help 11-03-14, 06:25 AM
Replies: 31
Views: 11,646
Posted By Phanx
So... adding one line of code is worse, in your...

So... adding one line of code is worse, in your mind, than adding multiple extra lines of code and adding the overhead of multiple metatables in your original example?



This is just bad...
Forum: Lua/XML Help 11-03-14, 01:17 AM
Replies: 31
Views: 11,646
Posted By Phanx
Your method still creates a frame object in...

Your method still creates a frame object in addition to the private table. Using multiple layers of metatables and trickery to make the private table identical to the frame is pointless and...
Forum: Lua/XML Help 11-02-14, 08:28 PM
Replies: 31
Views: 11,646
Posted By Phanx
This is incredibly overcomplicated and...

This is incredibly overcomplicated and pointless... if you want your globally-accessible object to be a frame, just make it a frame, and don't use the private table. The private table is only there...
Forum: Lua/XML Help 11-01-14, 01:11 AM
Replies: 31
Views: 11,646
Posted By Phanx
You're confusing methods with global variables....

You're confusing methods with global variables. There's only one global here:


function TomTom:SetClosestWaypoint(...)
end

function TomTom:AddMFWaypoint(...)
end

function TomTom:AddZWaypoint(...)
Forum: Lua/XML Help 10-31-14, 09:15 PM
Replies: 31
Views: 11,646
Posted By Phanx
Most variables you create and use in the course...

Most variables you create and use in the course of writing an addon should remain local. There are very few situations where a global variable is necessary or desirable. You should get to know what...
Showing results 1 to 8 of 8