More Awesome Than You!
Welcome, Guest. Please login or register.
2024 December 22, 23:36:44

Login with username, password and session length
Search:     Advanced search
540287 Posts in 18067 Topics by 6546 Members
Latest Member: choodno
* Home Help Search Login Register
+  More Awesome Than You!
|-+  The Bowels of Trogdor
| |-+  The Large Intestines of Trogdor
| | |-+  Scripting question (Event listening)
0 Members and 1 Chinese Bot are viewing this topic. « previous next »
Pages: [1] THANKS THIS IS GREAT Print
Author Topic: Scripting question (Event listening)  (Read 11216 times)
pbox
Garrulous Gimp
**
Posts: 315


View Profile
Scripting question (Event listening)
« on: 2011 January 26, 05:52:32 »
THANKS THIS IS GREAT

Is it possible to listen for a "GotPaidEvent" instead of any old event? I specifically need the PayType.

Also, when there's more than one listener for an event, what determines the order in which their actions are processed?
Logged
J. M. Pescado
Fat Obstreperous Jerk
El Presidente
*****
Posts: 26288



View Profile
Re: Scripting question (Event listening)
« Reply #1 on: 2011 January 26, 06:23:56 »
THANKS THIS IS GREAT

Set a listen for EventTypeId.kGotPaid, do an Is test for GotPaidEvent, and then cast and scan if so.

If more than one listener for an event exists, the execution will occur in arbitrary order, so don't rely on any specific order. No existing event listener is sensitive to order of execution, and you should probably not be throwing up tons of listeners for whatever you're doing. Just add a single global listener as part of the static class and process the spool from there.
Logged

Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off.
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.066 seconds with 19 queries.