Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 4 of 4 total |
Global notify list |
Wed, Oct 26 2016 5:57 AM | Permanent Link |
Matthew Jones | Has anyone done any sort of "global notification list"? Basically, some sort of event distribution system with listeners.
I'm not even sure how to store an event in a list. I could do it in an array I guess. Basically, I want to be able to say: g_xEventManager.AddListener(EVENT_ID, MyEventHandler, self); and something else to say: g_xEventManager.Notify(EVENT_ID, triggerObject); So something in the UI could trigger the event, and anything listening would get called to its event handler, passing in the trigger object (if anything, otherwise nil). This would allow the notifier to also ignore its own event if it was listening, because the trigger is itself, or something it uses. I half wonder if I've asked this before, or if there is something already built in... Anyone done this before? -- Matthew Jones |
Wed, Oct 26 2016 5:58 AM | Permanent Link |
Matthew Jones | Matthew Jones wrote:
> g_xEventManager.AddListener(EVENT_ID, MyEventHandler, self); Also need to be able to remove itself. Not sure if it should therefore use "self" again, or be returned an integer to pass back in to remove, but that risks bugs. Hmm. -- Matthew Jones |
Tue, Nov 1 2016 3:45 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Matthew,
<< Has anyone done any sort of "global notification list"? Basically, some sort of event distribution system with listeners. >> You could use the built-in TComponent notification mechanisms to do this, although they might not be entirely what you want. Check out the WebCore unit for more information. Tim Young Elevate Software www.elevatesoft.com |
Wed, Nov 2 2016 5:57 AM | Permanent Link |
Matthew Jones | Tim Young [Elevate Software] wrote:
> << Has anyone done any sort of "global notification list"? Basically, some sort of event distribution system with listeners. >> > > You could use the built-in TComponent notification mechanisms to do this, although they might not be entirely what you want. Check out the WebCore unit for more information. Looks perfect, and even has cmUser ready and waiting. Thank you. -- Matthew Jones |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |