 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Jul 21, 2008 8:24 pm
Should CMUD allow recursive triggers? |
There have been a couple posts about problems caused by Prompt triggers that re-test themselves if you modify the prompt from within the trigger.
The "Trigger on Trigger" option controls whether or not other triggers are allowed to fire while processing a trigger. However, should a trigger *ever* cause itself to fire recursively? (except when the Reparse option is specifically given).
I can't really see any situation where a single recursive trigger would be useful, and I can see lots of areas where this trigger loop can actually cause problems. But let me know what you think, especially if you currently depend upon any recursive triggers in your scripts. |
|
|
|
 |
Tech GURU

Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Mon Jul 21, 2008 8:29 pm |
I don't think they should be allowed if reparse isn't specifically checked. Advanced scripters will be aware of this and will know how to handle it properly, and new scripters can very easily get into trouble.
|
|
_________________ Asati di tempari! |
|
|
 |
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Mon Jul 21, 2008 10:20 pm |
As one of the individuals that had an issue with this, I'll add my opinion that it shouldn't re-test.
Anytime someone has a prompt in which they use a #SAYP or #SHOWP it is going to rematch on their prompt and cause an infinite loop unless they remembered to un-check that box.
It seems like anyone who intends for a re-parse to happen should be experienced enough to setup the trigger so that it does so with the existing mechanisms in place. |
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Jul 21, 2008 10:30 pm |
Heh, nevermind...
Turns out that this was actually a bug. I already had code in CMUD to try and prevent Prompt triggers from triggering on themselves. But this code was getting overridden elsewhere in CMUD so it wasn't working. So it looks like I never intended Prompt triggers to trigger on themselves. Sorry for the confusion.
In v2.33, Prompt triggers should not trigger on themselves ever. You'll have to test this for me (and also test Reparse trigger states) to let me know if it works properly in the new version once I release it. |
|
|
|
 |
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Mon Jul 21, 2008 10:45 pm |
Excellent, can't wait to try it.
|
|
|
|
 |
|
|
|