Giter Club home page Giter Club logo

Comments (3)

byteit101 avatar byteit101 commented on August 28, 2024

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.

amiracam avatar amiracam commented on August 28, 2024

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.

amiracam avatar amiracam commented on August 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.