Please support THandlers.Delete method in unit IW.Content.Handlers.pas - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html) +--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html) +---- Forum: English (https://www.atozed.com/forums/forum-16.html) +----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html) +----- Thread: Please support THandlers.Delete method in unit IW.Content.Handlers.pas (/thread-3944.html) |
Please support THandlers.Delete method in unit IW.Content.Handlers.pas - ccy - 03-13-2024 In unit IW.Content.Handlers.pas, THandlers.Add method is available but there is no Delete method to remove TContentBase handler. It is useful for application deployed with dynamic packages so we can write something like this: Code: initialization A patch for reference: Code: unit IW.Content.Handlers.Patch; RE: Please support THandlers.Delete method in unit IW.Content.Handlers.pas - Alexandre Machado - 04-04-2024 Hi, I created a new ticket with this request. It's not hard to implement but at the same time requires adding another lock to the THandlers class which is not ideal. I'll think about it.... RE: Please support THandlers.Delete method in unit IW.Content.Handlers.pas - Alexandre Machado - 04-04-2024 BTW, your helper class is correct, however it doesn't consider locking, i.e there is no safe way to add or delete handlers at runtime from multiple sessions which can cause problems. Do you unload the package before the application finishes, i.e., you would keep the application running after unloading a package that unregisters a content handler? |