Comments (3)
Hmm, I can't seem to repro. Adding the following code to the following files works for me and text fields pop up as expected:
diff --git a/samples/contrib/fxmltableview/FXMLTableViewController.rb b/samples/contrib/fxmltableview/FXMLTableViewController.rb
index b6e0ffc..2856164 100644
--- a/samples/contrib/fxmltableview/FXMLTableViewController.rb
+++ b/samples/contrib/fxmltableview/FXMLTableViewController.rb
@@ -37,13 +37,17 @@ require_relative 'Person'
class FXMLTableViewController
include JRubyFX::Controller
fxml "fxml_tableview.fxml"
-
+
+ def initialize
+ @firstNameColumn.setCellFactory(Java::javafx.scene.control.cell.TextFieldTableCell.forTableColumn());
+ end
+
def addPerson
data = @tableView.items
data.add(Person.new(@firstNameField.text,
@lastNameField.text,
@emailField.text))
-
+
@firstNameField.text = ""
@lastNameField.text = ""
@emailField.text = ""
diff --git a/samples/contrib/fxmltableview/fxml_tableview.fxml b/samples/contrib/fxmltableview/fxml_tableview.fxml
index 81c9e5f..97ddbe3 100644
--- a/samples/contrib/fxmltableview/fxml_tableview.fxml
+++ b/samples/contrib/fxmltableview/fxml_tableview.fxml
@@ -49,7 +49,7 @@
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
<Label style="-fx-font: NORMAL 20 Tahoma;" text="Address Book" GridPane.columnIndex="0" GridPane.rowIndex="0" />
- <TableView fx:id="tableView" GridPane.columnIndex="0" GridPane.rowIndex="1">
+ <TableView fx:id="tableView" GridPane.columnIndex="0" GridPane.rowIndex="1" editable="true">
<columns>
<TableColumn prefWidth="100.0" text="First Name" fx:id="firstNameColumn">
<cellFactory>
Also provide OS, JRuby version (1.7.3 has jrubyfx bugs, use 1.7.4) and java version (ruby -v will tell you this)
from jrubyfx.
Patrick
Gem versions aside, I did an import of the java class I.e I did not use
the fully qualified name, probably of no impact but disclosed just in case
-Charles
On May 31, 2013 5:46 PM, "Patrick Plenefisch" [email protected]
wrote:
Hmm, I can't seem to repro. Adding the following code to the following
files works for me and text fields pop up as expected:diff --git a/samples/contrib/fxmltableview/FXMLTableViewController.rb b/samples/contrib/fxmltableview/FXMLTableViewController.rbindex b6e0ffc..2856164 100644--- a/samples/contrib/fxmltableview/FXMLTableViewController.rb+++ b/samples/contrib/fxmltableview/FXMLTableViewController.rb@@ -37,13 +37,17 @@ require_relative 'Person'
class FXMLTableViewController
include JRubyFX::Controller
fxml "fxml_tableview.fxml"-++ def initialize+ @firstNameColumn.setCellFactory(Java::javafx.scene.control.cell.TextFieldTableCell.forTableColumn());+ end+
def addPerson
data = @tableView.items
data.add(Person.new(@firstNameField.text,
@lastNameField.text,
@emailField.text))-+
@firstNameField.text = ""
@lastNameField.text = ""
@emailField.text = ""diff --git a/samples/contrib/fxmltableview/fxml_tableview.fxml b/samples/contrib/fxmltableview/fxml_tableview.fxmlindex 81c9e5f..97ddbe3 100644--- a/samples/contrib/fxmltableview/fxml_tableview.fxml+++ b/samples/contrib/fxmltableview/fxml_tableview.fxml@@ -49,7 +49,7 @@
- +
Also provide OS, JRuby version (1.7.3 has jrubyfx bugs, use 1.7.4) and
java version (ruby -v will tell you this)—
Reply to this email directly or view it on GitHubhttps://github.com//issues/49#issuecomment-18773334
.
from jrubyfx.
Ok. loaded all code and also made changes to accommodate new usage , and I can now get the fields to open for editing
from jrubyfx.
Related Issues (20)
- jrubyfx sensitive to number of spaces in fxml HOT 2
- Enhancement: Provide Ruby binding impls HOT 1
- Setting TableView items doesn't seem to work HOT 4
- Jar classpath issue on windows HOT 1
- jarify with fxml: no .jrubyfx_cache in the jarfile HOT 1
- jarify with fxml: cannot access the fxml files
- jarify with fxml: require_relative doesn't work from inside a jarfile
- jrubfx-jarify compiled jar does not laucnch HOT 5
- cannot run the hello world app HOT 2
- gem install jrubyfx gem not found HOT 1
- Permission denied for 'jrubyfx_cache' HOT 2
- Need more documentation for controller functions HOT 1
- jrubyfx não encaminhando HOT 2
- Is this project active ? HOT 3
- Path to jfxrt.jar loading issue with 1.8.0_202-ea-b03 HOT 1
- Would it be possible to add a screenshot-example to the main README here? HOT 1
- Use javafx 17 modules HOT 3
- Warning: SCENE3D? HOT 1
- More examples perhaps? TextArea specifically
- Classic OOP style? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jrubyfx.