Closed arnor2000 closed 11 years ago
That's too bad. I think you're right that there's nothing SuperEventBus can do here since we don't have enough type information. Dispatching objects to handlers that aren't expecting them would be pretty dangerous, so I think it's best to fail fast and not allow JSOs to be posted at all. The workaround would be to wrap the JSO in an event object of some sort. I've added the check and a warning in the docs, thanks for pointing this out.
I don't think it's a SuperEventBus bug, rather an overlay limitation but it should be at least documented.
Overlays are viewed only as JavaScriptObject and never as defined subtypes, causing all posted JSO subtypes events to be sent to all JSO subtypes subscribers.