LDT - Execution Environment. Help! [message #1416934] |
Sun, 07 July 2013 08:54 |
simon birkedal Messages: 12 Registered: July 2013 |
Junior Member |
|
|
Greetings,
I'm trying to develop my own Execution Environment for World of Warcraft(in LDT), so far it works well. Now i'm at the Widget Reference, which requires the following:
myVariable:WidgetAPI, an example would be:
local btn = CreateFrame("Button", "MyButton", UIParent)
btn:SetSize(10, 10)
btn:SetPoint("TOPLEFT", UIParent, "TOPRIGHT")
is there a way to make the execution environment register the widget api according to the variable given in the line before to register which FrameType i selected here: CreateFrame("FrameType", "Name", Parent)
So if the "FrameType" would be something like this instead:
local frame = CreateFrame("Frame", "MyFrame", UIParent)
frame:SetClampedToScreen(true)
frame:EnableMouse(true)
frame:RegisterForDrag(true)
So code assist works as soon as i type, myVariable:
Sorry for my English.. Thank you in advance!
|
|
|
Re: LDT - Execution Environment. Help! [message #1416935 is a reply to message #1416934] |
Mon, 08 July 2013 09:26 |
Simon Bernard Messages: 345 Registered: July 2009 |
Senior Member |
|
|
Hi,
Currently there are no way to define a function which returns different types according a parameter value.
If we implements this feature, I don't really know how could be the syntax to do that in documentation language :).
For now, the only thing you could do is to create all the type users needed in your execution environment.
And users of your execution environment should use http://wiki.eclipse.org/Koneki/LDT/User_Area/New_Noteworthies/New_Noteworthy_1.0#Explicit_Variable_Description_.26_Typing to type their variables :
local frame = CreateFrame("Frame", "BagBuddy", UIParent) -- yourmodule#frame
frame:SetSize(425, 425)
frame:SetPoint("CENTER", UIParent, "CENTER")
local btn = CreateFrame("Button", "MyButton", UIParent) -- yourmodule#button
btn:SetSize(10, 10)
btn:SetPoint("TOPLEFT", UIParent, "TOPRIGHT")
For the texture sample not sure I understand the point :).
Simon
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04227 seconds