Class: QML::Interface
- Inherits:
-
Object
- Object
- QML::Interface
- Defined in:
- lib/qml/interface.rb
Class Method Summary collapse
- .call_method(obj, name, args) ⇒ Object
-
.notify_error(error) ⇒ Object
Called when an Ruby error is occured in executing Qt code.
Class Method Details
.call_method(obj, name, args) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/qml/interface.rb', line 4 def self.call_method(obj, name, args) begin obj.__send__ name, *args rescue => error notify_error(error) nil end end |
.notify_error(error) ⇒ Object
Called when an Ruby error is occured in executing Qt code.
15 16 17 18 19 |
# File 'lib/qml/interface.rb', line 15 def self.notify_error(error) warn "-- An error occured when running Ruby code from Qt --" warn "#{error.class.name}: #{error.}" warn "Backtrace: \n\t#{error.backtrace.join("\n\t")}" end |