Closed silvereyes333 closed 4 years ago
I think you might be confusing the descriptionData
table with the desc
control instance. The implication that self
refers to desc
is accurate, because desc
is the control.
That said, there's no real reason to be creating a separate handler function for every unique instance of the description widget. I also don't need need access to any of the local variables in the surrounding method, so there's no reason to use an anonymous method and incur the overhead of a closure. I moved the handler to a local function instead.
Three possible values allowed:
nil
(default): links are disabledtrue
: links clicks will callZO_LinkHandler_OnLinkClicked(linktext, button)
function(labelControl, linkData, linkText, button, ctrl, alt, shift, command) end
: the custom function passed will be called upon link click.