Thread: SellAllJunk()
View Single Post
12/17/14, 06:47 PM   #6
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
First, thank you for the help everyone that replied. I understood what everyone said, but that brings me to one more question.

Ok going by what Merlight said: this assigned callback a reference to SellAllJunk()
Lua Code:
  1. callback =  SellAllJunk,

So I would assume that, combined with what Garkin said, would mean that:
It creates the reference to the function BEFORE my SellAllJunk() is defined, AND when I define my SellAllJunk() it does not (not sure how to phrase it, but) overwrite the original SellAllJunk() in the same spot? I.E. mine will have a different reference?
EDIT:
I never thought about it before, but I guess that makes sense. It would have to have a different reference because I do realize that:
Lua Code:
  1. OrigSellAllJunk()
Is still useable, so the original function must still exist somewhere & have a different reference.

Last edited by circonian : 12/17/14 at 06:50 PM.
  Reply With Quote