{"action":"created","issue":{"url":"https://api.github.com/repos/ReactiveX/RxJavaFX/issues/76","repository_url":"https://api.github.com/repos/ReactiveX/RxJavaFX","labels_url":"https://api.github.com/repos/ReactiveX/RxJavaFX/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveX/RxJavaFX/issues/76/comments","events_url":"https://api.github.com/repos/ReactiveX/RxJavaFX/issues/76/events","html_url":"https://github.com/ReactiveX/RxJavaFX/issues/76","id":379872589,"node_id":"MDU6SXNzdWUzNzk4NzI1ODk=","number":76,"title":"JavaFxObservable.valuesOf() and Bindings.bindBidirectional() strange behaviour.","user":{"login":"pkrysztofiak","id":44398034,"node_id":"MDQ6VXNlcjQ0Mzk4MDM0","avatar_url":"https://avatars2.githubusercontent.com/u/44398034?v=4","gravatar_id":"","url":"https://api.github.com/users/pkrysztofiak","html_url":"https://github.com/pkrysztofiak","followers_url":"https://api.github.com/users/pkrysztofiak/followers","following_url":"https://api.github.com/users/pkrysztofiak/following{/other_user}","gists_url":"https://api.github.com/users/pkrysztofiak/gists{/gist_id}","starred_url":"https://api.github.com/users/pkrysztofiak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkrysztofiak/subscriptions","organizations_url":"https://api.github.com/users/pkrysztofiak/orgs","repos_url":"https://api.github.com/users/pkrysztofiak/repos","events_url":"https://api.github.com/users/pkrysztofiak/events{/privacy}","received_events_url":"https://api.github.com/users/pkrysztofiak/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-12T17:09:54Z","updated_at":"2018-11-20T15:45:06Z","closed_at":"2018-11-20T15:45:06Z","author_association":"NONE","body":"EDIT Rx works fine. Described issue is caused by weak refernces.\r\nI wanted to bind two properties and listen for changes on both, using RxJavaFx.\r\nWhat I expected was - bind two properties, write to only one of them and listen for changes on both. It turned out it worked as I expected only using pure fx. Using RxJavaFx (please uncomment lines) causes firing change event only on directly updated property (even fx listener stopped to work).\r\nAnother strange thing is that at first everything seems to work perfectly (\"wow\" line).\r\n \r\n```java\r\nimport javafx.application.Application;\r\nimport javafx.beans.binding.Bindings;\r\nimport javafx.beans.property.ObjectProperty;\r\nimport javafx.beans.property.SimpleObjectProperty;\r\nimport javafx.beans.value.ChangeListener;\r\nimport javafx.scene.Scene;\r\nimport javafx.scene.control.Button;\r\nimport javafx.scene.layout.HBox;\r\nimport javafx.stage.Stage;\r\n\r\npublic class BidingsTestApp extends Application {\r\n\r\n    public static void main(String[] args) {\r\n        launch(args);\r\n    }\r\n    \r\n    @Override\r\n    public void start(Stage stage) throws Exception {\r\n        Button button1 = new Button(\"one\");\r\n        Button button2 = new Button(\"two\");\r\n        HBox hBox = new HBox(button1, button2);\r\n        \r\n        stage.setScene(new Scene(hBox));\r\n        stage.show();\r\n        \r\n        ObjectProperty<String> property1 = new SimpleObjectProperty<>();\r\n        ObjectProperty<String> property2 = new SimpleObjectProperty<>();\r\n        \r\n        Bindings.bindBidirectional(property1, property2);\r\n        \r\n        property1.addListener((ChangeListener<String>) (observable, oldValue, newValue) -> System.out.println(\"fx property1 changed to value=\" + newValue));\r\n        property2.addListener((ChangeListener<String>) (observable, oldValue, newValue) -> System.out.println(\"fx property2 changed to value=\" + newValue));\r\n//        JavaFxObservable.valuesOf(property1).subscribe(text -> System.out.println(\"rx property1 changed to value=\" + text));\r\n//        JavaFxObservable.valuesOf(property2).subscribe(text -> System.out.println(\"rx property2 changed to value=\" + text));\r\n        \r\n        property2.set(\"wow\");\r\n        \r\n        button1.setOnMouseClicked(event -> property2.setValue(\"one\"));\r\n        button2.setOnMouseClicked(event -> property2.setValue(\"two\"));\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/ReactiveX/RxJavaFX/issues/comments/440319951","html_url":"https://github.com/ReactiveX/RxJavaFX/issues/76#issuecomment-440319951","issue_url":"https://api.github.com/repos/ReactiveX/RxJavaFX/issues/76","id":440319951,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MDMxOTk1MQ==","user":{"login":"thomasnield","id":7420801,"node_id":"MDQ6VXNlcjc0MjA4MDE=","avatar_url":"https://avatars3.githubusercontent.com/u/7420801?v=4","gravatar_id":"","url":"https://api.github.com/users/thomasnield","html_url":"https://github.com/thomasnield","followers_url":"https://api.github.com/users/thomasnield/followers","following_url":"https://api.github.com/users/thomasnield/following{/other_user}","gists_url":"https://api.github.com/users/thomasnield/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasnield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasnield/subscriptions","organizations_url":"https://api.github.com/users/thomasnield/orgs","repos_url":"https://api.github.com/users/thomasnield/repos","events_url":"https://api.github.com/users/thomasnield/events{/privacy}","received_events_url":"https://api.github.com/users/thomasnield/received_events","type":"User","site_admin":false},"created_at":"2018-11-20T15:45:06Z","updated_at":"2018-11-20T15:45:06Z","author_association":"COLLABORATOR","body":"Interesting nonetheless though. I'll go ahead and close and please let me know if anything else pops up, even if it's interesting behaviors. "}}
{"actor":{"display_login":"thomasnield"}}