LDT - Execution Environment. Help! [message #1416934] |
Sun, 07 July 2013 04:54  |
Eclipse User |
|
|
|
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 05:26   |
Eclipse User |
|
|
|
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
|
|
|
|
|
|
|
|
|
|
Re: LDT - Execution Environment. Help! [message #1416948 is a reply to message #1416947] |
Wed, 10 July 2013 05:49  |
Eclipse User |
|
|
|
Ty very much - i'll give it a go :)
I will keep ya updated on how it goes :) But according to your description of type its starting to make sense :) Is it possible to make it : instead of the letters A-Z? :) Also do you know if you can somehow add regular expressions to variables - generally in lua, can't seem to find it.
Then i could do something like: local %a+: = require 'geometry'
|
|
|
Powered by
FUDForum. Page generated in 0.05319 seconds