What steps will reproduce the problem?
- Embed LNR in an AddOn's table
- Register for LNR_ON_TARGET_PLATE_ON_SCREEN, LNR_ON_RECYCLE_PLATE and all diagnostic callbacks
What is the expected output?
Registered callbacks fire at the appropriate time and the methods registered to them are called.
What do you see instead?
No callbacks are fired.
What version of the product are you using?
Do you have an error log of what happened?
No errors were thrown.
Please provide any additional information below.
I was attempting to update my TargetNameplateIndicator AddOn to use LNR, but during testing none of the callbacks I'd registered were firing.
To test if I was just doing something wrong in my AddOn, I wrote this script to register all the callbacks and print out their arguments when they fired. After running this, I noticed that the callbacks registered by my AddOn were being fired.
I then looked at LNR's source code and noticed that LNR_Private:Enable() was only being called when the LNR_ON_NEW_PLATE callback was registered. To test if this was the cause of my problem, I edited LNR's source to create a global reference to LNR_Private. When I logged into the game with my AddOn enabled, none of my callbacks were being fired; but after manually calling LNR_Private:Enable(), all of the callbacks were firing at the appropriate time.
To fix this, I believe you need to modify the LNR_Private.callbacks:OnUsed/OnUnused methods to enable/disable the library when callbacks other than LNR_ON_NEW_PLATE are registered/unregistered.
|Archarodim||Dec 17, 2013 at 18:18 UTC||Changed status from Replied to Fixed|
|Choonster||Dec 17, 2013 at 15:40 UTC||Changed status from Waiting to Replied|
|Archarodim||Dec 04, 2013 at 22:18 UTC||Changed status from Accepted to Waiting|
|Archarodim||Dec 04, 2013 at 22:18 UTC||Changed status from Started to Accepted|
|Archarodim||Dec 04, 2013 at 22:18 UTC||Changed status from New to Started|
|Choonster||Dec 04, 2013 at 12:28 UTC||Create|
- 3 comments
- Last updated
- Dec 17, 2013
- Dec 04, 2013
- Fixed - Developer made requested changes. QA should verify.
- Defect - A shortcoming, fault, or imperfection
- Medium - Normal priority.