Also GetAliasOption and the like as well, I hope? Both *Option and *Info work this way in the current version, I want to make sure it wasn't changed inadvertently.
(Actually, I imagine that any Alias, Trigger, or Timer function that accepts a name should work as expected, not just the Option/Info ones)
It wasn't easy to do, but I have incorporated this suggestion in version 4.50. [commit 2919843]
The main problem was that trigger/alias/timer *pointers* were being passed around, which means that at that stage they are divorced from whatever name they were stored in the map with.
Now every trigger/timer/alias script function should be given a non-empty name, with the first character being "*" if the name was not assigned by a human. This name can be used in GetTriggerInfo, GetTimerInfo, GetAliasInfo.
Amended on Sat 13 Feb 2010 07:08 PM (UTC) by Twisol
Message
Worstje said: However, in cases that people do use the name to radically change the logic of a trigger
It's not so much about treating unnamed triggers differently than treating them all the same, whether they're named or not.
EDIT: In the case that you're talking about other people who check "" - it's not quite clear which you meant - and treat them differently based on that, then I agree.
Good idea. Never needed it, but I don't see any harm for plugin compatibility in practice. The chance someone will check for an empty name when handling the trigger script will not be likely to contain specialized handling, only handling for not calling a dozen functions which would obviously not work with an empty name.
However, in cases that people do use the name to radically change the logic of a trigger, I have to both question the sanity of using the same trigger for named and unnamed triggers, as they clearly aren't much alike. As a temporary solution, such scripts should be adjusted to check the first few lines of the script for *alias/*trigger, or maybe a plain * as I don't think it is an allowed character for names anyhow.
I'd like this as well. A lot of my triggers/aliases are not named.
Alternatively, I'd be happy if say, the error returned the 'match' and 'sequence' number of a trigger, or alias. This would also help immensely.
Yes, I am a criminal.
My crime is that of curiosity.
My crime is that of judging people by what they say and think, not what they look like.
My crime is that of outsmarting you, something that you will never forgive me for.
When calling the function named in the 'script' field of aliases/timers/triggers, would it be possible to send the internal name, regardless of whether it's not named? To be clear, I meant that if you have an unnamed alias, I want to be sent "*alias1234" as the name, not "" (empty string). This is important so I can get at the details/options of the alias that was used, regardless of the status of its name.
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.