PDA

View Full Version : bug: onUpdate event not firing on module data



JMessmer
November 1st, 2020, 13:03
I have found a bug when adding a onUpdate handler on a module:

this does not work:


local sPath = DB.getPath(nodeTmp);
Debug.console("sPath", sPath);
DB.addHandler(sPath, "onUpdate", onHandleUpdate);

console output:
item.id-00878.istidentifiziert@DSA Ausrüstung

while this works:


local sPath = DB.getPath(nodeTmp):gsub("@.*", "@*");
Debug.console("sPath", sPath);
DB.addHandler(sPath, "onUpdate", onHandleUpdate);

console output:
item.id-00878.istidentifiziert@*

Another one of the examples that cost me a lot of time and nerves. If I did not come to the idea of checking if the event handler might not be able to deal with the module name I would not have found it.

Moon Wizard
November 1st, 2020, 17:03
This should be working as intended; and is used in a lot of places in many different rulesets. If this didn't work, it would break many rulesets.

Do you have a simple extension and module showing an example of this not working?

Regards,
JPG

JMessmer
November 1st, 2020, 20:37
Hi JPG, I know you are doing a hell of job working every day. You are trying to get FGU up and running and at the same time you are taking care of all our requests here in the forums.
This being said I really would be glad if you could take your time with some of the posts. This is the third post in a row where I have the feeling that you are not taking me seriously. I wonder if I should report anything at all.
It is not working - I spent two days on this one. I assume that it is due to the umlaut in the module name and the utf8 issues.

Yes, I do have a ruleset, a campaign and a module you could test it with. I can upload it on GoogleDrive and send you a PM with the access data and also link to the other issues that I posted here. Would this work for you?

Moon Wizard
November 1st, 2020, 20:54
I apologize. As you say, I am covering too many things right now.

However, some of the issues you are reporting are core functionality that are otherwise working in the product for many other rulesets. I'm not saying that you don't have a true issue; but I need your help to drill down and recreate the issue in a much simpler scenario. Preferably an extension I can load right into an existing ruleset, and see the issue right away.

Without an exact example to be able to recreate and track down the issue, I'm left with guessing at what is happening in your situation. While providing a ruleset/campaign/module is also useful; it takes quite a lot more work for me to try and set up everything just like you have it as well as try to follow your exact steps to recreate.

So, I ask you to help me help you, by trying to narrow the issues you are reporting for me so that I can resolve sooner.

Regards,
JPG