for id, element in pairs( table ) do -- How to use luadoc? [message #1733290] |
Thu, 26 May 2016 04:33  |
Eclipse User |
|
|
|
Hi,
I am using the LDT and the luadoc documentation standard extensively and with much success!
However, there is one syntax where i have a big question, and that is with for loops ...
My question is: In the underlying code fragment, how can i get the intellisense understand that Contact declared in the for do loop, is of type CONTACT?
thanks in advance for your help!
kind regards,
Sven
--- @type AGENT
-- @field #AGENT.CONTACTS Contacts
AGENT = {
Contacts = {}
}
--- @type CONTACT
CONTACT = {
Name = "Sven",
Address = "Rubenslei",
City = "Antwerpen"
}
--- @type AGENT.CONTACTS
-- @list <#CONTACT>
do
AGENT.Contacts[1] = CONTACT
print( AGENT.Contacts[1].Name )
for ContactID, Contact in pairs( AGENT.Contacts ) do
print( Contact.Name )
end
end
|
|
|
|
Powered by
FUDForum. Page generated in 0.03652 seconds