Method: Roby::Application#on_ui_event

Defined in:
lib/roby/app.rb

#on_ui_event {|name, args| ... } ⇒ Object

Registers a block to be called when a message needs to be dispatched from #ui_event

Yield Parameters:

  • name (String)

    the event name

  • args

    the UI event listener arguments

Returns:



3212
3213
3214
3215
3216
3217
3218
3219
# File 'lib/roby/app.rb', line 3212

def on_ui_event(&block)
    unless block
        raise ArgumentError, "missing expected block argument"
    end

    ui_event_listeners << block
    Roby.disposable { ui_event_listeners.delete(block) }
end