View Single Post
11-02-10, 08:38 AM   #16
Ailae
A Rage Talon Dragon Guard
 
Ailae's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 318
Is this line

lua Code:
  1. SK.Frame.Options_Drag:SetScript("OnEvent", function(obj, event, ...) self:RegisterForDrag("LeftButton") end)

supposed to be equivalent to this line

xml Code:
  1. <OnLoad>self:RegisterForDrag("LeftButton");</OnLoad>

? If so, they are not. :P The one you have in the lua says that when an event fire it should perform :RegisterForDrag. But you never register any event for the frame. Frames created via lua doesn't have a OnLoad-script as far as I know, so you can just do this straight away.

lua Code:
  1. SK.rame.Options_Drag:RegisterForDrag("LeftButton")

You might have to run :EnableMouse(true) as well.
__________________
Oh, the simulated horror!
  Reply With Quote