Quantcast
Updating stuff on the Wiki - ESOUI
 
Thread Tools Display Modes
04/10/14, 04:29 AM   #1
Stormknight
 
Stormknight's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 128
Updating stuff on the Wiki

I'm happy to update stuff on the Wiki here and there, whilst building Add-ons. It only seems fair, as I'm using it a LOT as a reference and it makes it better for everyone moving forward.

I've entered info for a couple of events, including one of the most used ones and it occurred to me that there are clearly many different styles/methods of coding, so I'm looking for some experienced eyes to check for me whether what I've put here makes sense (especially regarding the example). I spent several years creating add-ons for Warcraft, but nothing for the last 3 years, so just getting back into this.

http://wiki.esoui.com/EVENT_ADD_ON_LOADED
  Reply With Quote
04/10/14, 04:41 AM   #2
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 432
Thank you Stormknight, and everyone else who is helping with adding info to the wiki. It's very much appreciated.
  Reply With Quote
04/11/14, 12:54 PM   #3
Iyanga
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 185
One thing about events is that the WIKI does not show that events get as first parameter the eventCode, this should be included in the event descriptions, it only leads to the same 'why doesn't this work' questions here.

And imho it's better to link to enumerations already in the parameters, i.e.

EVENT_EXPERIENCE_UPDATE(string unitTag, integer currentExp, integer maxExp, ExperienceReason reason)

Last edited by Iyanga : 04/11/14 at 02:16 PM.
  Reply With Quote
04/11/14, 07:17 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 651
But the event code *isn't* a return from the event. It's a return from the event handler, saying which event was fired. This is documented in the guides on the wiki. The event code should not be documented as a return from the event. It should be documented in how to use the event handler (RegisterForEvent) function.
  Reply With Quote
04/12/14, 06:49 AM   #5
Iyanga
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 185
Thumbs up

Originally Posted by Seerah View Post
But the event code *isn't* a return from the event. It's a return from the event handler, saying which event was fired. This is documented in the guides on the wiki. The event code should not be documented as a return from the event. It should be documented in how to use the event handler (RegisterForEvent) function.

I disagree with the conclusion.


function obj.myfunc(param1, param2)
return obj.myfunc2(param3, param1, param2)
end

The signature for obj.myfunc2() is
obj.myfunc2(param3, param1, param2)

It doesn't matter where and how param3 manages it's way onto the stack, it needs to be on the stack for the function call of obj.myfunc2. Therefore param3 is part of its calling signature and trying to use obj.myfunc2 with 2 params will fail, the thing that people experience here.
  Reply With Quote
04/12/14, 10:09 AM   #6
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 651
Of course, anything passed through by the event handler goes straight to the function.

/edit: it works this same exact way in WoW, and no one through the 10 years of programming addons or writing docs for that game thought the event code (name) needed to be documented with the event itself.
  Reply With Quote

ESOUI » Developer Discussions » Wiki » Updating stuff on the Wiki

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off