Skip to content

Enhancement: Provide Ruby binding impls #112

@enebo

Description

@enebo
java_import Java::javafx.beans.binding.StringBinding

class RubyStringBinding < StringBinding
  def initialize(property:, method:)
    super()
    @property, @method = property, method
    bind @property
  end

  def computeValue
    property_value = @property.get
    return unless property_value
    property_value.__send__ @method
  end
end

The Java bindings provided from Bindings assumes Java reflective lookup so they cannot see our Ruby methods...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions