Hello all !
I'm currenlty using CEGUI in some GUI. But I recently stumbled over a problem : how to do in the good way some events subscriptions and unsubcriptions resulting from an event subscribed by the same widget...
The very problem is the Event::connectionOrdering map that is being modified during its browsing in the () operator method.
In the first place, to "correct" the issue, I added some basic index test to avoid passing beyond the reality when some event is purelly deleted from the list (on disconnection).
But now, a new configuration proves the inefficiency of such a solution : one event (the only the widget has subscribed to) is fired. During its process, it is disconnected (let's assume my work around could work so far) BUT, then, always during the same process, the widget subscribes the same event again (in fact, just the concerned instance is not the same). So when we're back in the () operator method, the map seems unchanged.
But the end() method test obviously fails, guiding us in another dimension...
Has anyone ever experienced these issues ? Does anything exist (despite my searches) in the CEGUI code to handle those special (un)subscriptions ?
Any help will be appreciated, thanks
Events (un)subscriptions within other events processings
Moderators: CEGUI MVP, CEGUI Team
- vinnythetrue
- Not too shy to talk
- Posts: 21
- Joined: Wed Aug 10, 2005 10:29
- vinnythetrue
- Not too shy to talk
- Posts: 21
- Joined: Wed Aug 10, 2005 10:29
Re: Events (un)subscriptions within other events processings
Come'on guys ! No one here experienced such issues ? 

- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
Re: Events (un)subscriptions within other events processings
do the un-subscription safely outside of the event handler.
thing is you've hit a spot where CEGUI could use improvement, and this takes time.
you're free to submit a patch with a workaround. CEGUI is after all open-source...
thing is you've hit a spot where CEGUI could use improvement, and this takes time.
you're free to submit a patch with a workaround. CEGUI is after all open-source...
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 10 guests