More Awesome Than You!
Welcome, Guest. Please login or register.
2019 November 17, 13:46:45

Login with username, password and session length
Search:     Advanced search
539953 Posts in 18023 Topics by 7853 Members
Latest Member: Sunstroke
* 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 Guest are viewing this topic. « previous next »
Pages: [1] THANKS THIS IS GREAT Print
Author Topic: Scripting question (Event listening)  (Read 7969 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: 26207



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.085 seconds with 19 queries.