Create general handler for creating/deleting parts [message #1802903] |
Mon, 18 February 2019 18:42  |
João Pedro Messages: 52 Registered: December 2014 |
Member |
|
|
I'm wondering how to make a global Handler (not an IOnClickHandler !! ).
And why do I need a handler extending AbstractHandler for this? When 3 events happen I need to create/delete some parts and as far as I can see the init() and commit() functions are part of the AbstractHandler.
Am I looking at this in the wrong way and do I need an operation instead of a handler? Any feedback is deeply appreciated
[Updated on: Mon, 18 February 2019 18:42] Report message to a moderator
|
|
|
Re: Create general handler for creating/deleting parts [message #1802908 is a reply to message #1802903] |
Mon, 18 February 2019 19:48   |
|
Hi Joao,
a handler may implement any number of interfaces. Hence, you can react to all gestures using just a single handler. Note that an open transaction is only closed when all active gestures are finished, though.
Furthermore, a handler implementation does not need to extend AbstractHandler. That is just convenience (e.g. init(), commit() methods that you already use).
Each policy provides init() and commit() methods that can be used to initialise and commit a policy, respectively. This can also be seen from the AbstractHandler implementation.
Best regards,
Matthias
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02387 seconds