@edvin I have a custom scope but I want to register for app-wide events. Using DefaultScope on the declaration and fire() is easy enough
object ShutdownEvent : FXEvent(scope=DefaultScope)
fire(ShutdownEvent)
however on the subscriber side, it looks like you're locked in to a framework scope setting
I'm doing this as a workaround
init {
FX.eventbus.subscribe<ShutdownEvent>(
DefaultScope,
FXEventRegistration(ShutdownEvent::class, this, 1L) {
root.scene.window!!.hide()
}
)
}