IMC gurus...
I have read every post with IMC and Inter-Module communication and I cannot find the cause of my problem. The ModuleCommuication event handler is still coming up null on my linkButton callback. Using VS2008, .NET 3.5, IIS 6, DNN 5.0 RC2.
I have two modules on a DNN5 page, one implementing IModuleCommunicator and one implementing IModuleListener.
When I attach to the process and debug, I see each one setting up in ModuleCommunications. That is, ModuleCommunication::LoadCommunicator was shown to be called for each module that is on the page.
However, in the code itself, it checks the list of OPPOSITE-type entries and adds the callback to the OnCommunication... which seems to make some sense... but what I'm seeing and what's baffling is that the private collection vars _ModuleListeners and _ModuleCommunicators are always empty when each module fires up.
When the first module is instantiated (the communicator) it makes sense... no other modules have been seen yet on the page so it has no listeners to which to append a callback. However,when the listener module is injected, one would think it would be able to see the existing communicator, right? If it saw the communicator, it would append it's event to its ModuleCommunication handler and all would be grand.
However, these collections appear to be private for every module instance, and no attempt seems to be ocurring to udpate them at a page-wide level. Thus, no events ever get added to the ModuleCommunication event handlers on either module, and thus, they don't talk to each other.
I used to have this working in 4.9, but I didn't have to study the code so I'm not sure about what might have gotten changed or what I'm missing.
I had all zeros for module cacheing (2 on each module... the one in module definitions and the other on the modules' setting page in EDIT mode). Still did not work. I saw one poster by an IMC user who found a fix by changing the cacheing values to -1, so I did that (However 5.0 kept complaining that the friendly name was already taken so I couldn't update via the UI, so I did it via the db). Interestingly, the module timeout field disappeared in the module settings page! Still no IMC happening here.
I've been reviewing the code in some detail and it's not at all clear why _ModuleListeners and _ModuleCommunicators would be private variables on a given module. Is there another hook somewhere that would populate these when the whole page is done constructing?
Thanks for any guidance you can provide...
Jesse W.