Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using JavaFX ObservableMap's of Ruby Hashes fails to send events #930

Closed
byteit101 opened this issue Jul 30, 2013 · 1 comment
Closed

using JavaFX ObservableMap's of Ruby Hashes fails to send events #930

byteit101 opened this issue Jul 30, 2013 · 1 comment

Comments

@byteit101
Copy link
Member

ob_map = FXCollections.observable_map(java.util.HashMap.new)
ob_map.addListener Java::javafx.collections.MapChangeListener.impl{|name, x| puts "hi"}
ob_map[:key] = "value" #=> "hi"

ob_map = FXCollections.observable_map({})
ob_map.addListener Java::javafx.collections.MapChangeListener.impl{|name, x| puts "hi"}
ob_map[:key] = "value" # no output

@enebo narrowed it down to being MapJavaProxy not calling put in op_aset

@kares
Copy link
Member

kares commented Aug 26, 2015

this seems no longer an issue on Java 8u45 ... on Java 7 the put is called but the observable map wrapper does no trigger any change operation - seems like a JavaFX bug to me.

@kares kares closed this as completed Aug 26, 2015
@kares kares added this to the Invalid or Duplicate milestone Aug 26, 2015
kares added a commit that referenced this issue Aug 26, 2015

Unverified

This user has not yet uploaded their public signing key.
kares added a commit that referenced this issue Aug 26, 2015
* jruby-1_7:
  'more correct' MapJavaProxy key?/include? check that (only) does containsKey
  rename internal getMap to mapDelegate + add some notes on overrides
  remove empty line
  expose iteration check for sub-classes + cleanup putAll (in RubyHash)
  override more of inherited aset operations on MapJavaProxy (see #930)
  minimize MapJavaProxy's memory usage - allocate zero RubyHash buckets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants