Philippe Lang
2009-Jan-19 07:56 UTC
[fxruby-users] FXTextField, FXTable, cut-copy-paste problems
Hi, There are a few cut-copy-paste problems under FXRuby. I took the time this morning to test everything carefully. Here is the test code I have been using: --------------------------- #!/usr/bin/ruby require ''fox16'' include Fox class MyWindow < FXMainWindow def initialize(app) super(app, "Window", nil, nil, DECOR_ALL, 0, 0, 600, 350) # Menu bar stretched along the top of the main window menubar = FXMenuBar.new(self, LAYOUT_SIDE_TOP|LAYOUT_FILL_X) # File menu filemenu = FXMenuPane.new(self) FXMenuTitle.new(menubar, "&File", nil, filemenu) FXMenuCommand.new(filemenu, "&Quit\tCtl-Q\tQuit the application", nil, app, FXApp::ID_QUIT) # Table and textfield f = FXVerticalFrame.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y) tf = FXTextField.new(f, 16) t = FXTable.new(f, nil, 0, TABLE_COL_SIZABLE|LAYOUT_FILL_X|LAYOUT_FILL_Y) t.visibleRows = 3 t.visibleColumns = 3 t.setTableSize(3, 3) # Data tf.text = "123" t.setItemText(1, 1, "456") end def create super show(PLACEMENT_SCREEN) end end if __FILE__ == $0 application = FXApp.new("Attik System", "FXRuby Test") MyWindow.new(application) application.create application.run end --------------------------- As we can expect, cut or copy behave exactly the same, so I''m just taking into account the copy-paste commands between the FXTextField and the FXTable. There are differences when you issue a command on an FXTable selected cell (after a single clic on a cell, I''ll call that the "select mode"), or on an FXTable cell in "edit mode" (with the cursor blinking in it). Here are the results: --------------------- 1. Copy-paste from FXTextField to FXTextField -> Everything is fine 2. Copy-paste from FXTextField to FXTable -> Everything is fine 3. Copy-paste from FXTable to FXTextField -> Copy in select mode: trailing characters are added at the end of the pasted text -> Copy in edit mode: nothing is pasted 4. Copy-paste from FXTable to FXTable -> Copy in edit mode, paste in select mode: nothing is pasted -> Copy in edit mode, paste in edit mode: nothing is pasted -> Copy in select mode, paste in select mode: everything is fine -> Copy in select mode, paste in edit mode: trailing characters are added at the end of the pasted text My setups: ---------- Windows XP, Ruby 1.8.6, FXRuby 1.6.18 MacOS X, Ruby 1.8.6, FXRuby 1.6.18 Is that a fox or fxruby problem? Philippe
Lyle Johnson
2009-Jan-19 15:47 UTC
[fxruby-users] FXTextField, FXTable, cut-copy-paste problems
On Jan 19, 2009, at 1:56 AM, Philippe Lang wrote:> There are a few cut-copy-paste problems under FXRuby...<snip>> Is that a fox or fxruby problem?It''s definitely a FOX bug. FXRuby just passes all of that data through as-is.
Hello, I''d like my app to response when a cell in my table is changed interactively (responding after the change has been done). For example, I want to pop up a confirmation dialog box. Looking at FXRuby or Fox API for FXTable and FXTableItem does not give me a clue what message FXTableItem or FXTable is sending when such event occurs. What message does it send? Or how can I detect that a cell value has been changed? If the information is available in RDoc, I''d appreciate if you can tell me where to look for, as the page for FXTable or FXTableItem itself does not give me a clue. Thank you in advance -andre _________________________________________________________________ Windows Live? Hotmail?: Chat. Store. Share. Do more with mail. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_hm_justgotbetter_explore_012009 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20090119/840426d8/attachment.html>
My apology, I misread FXTable''s SEL_REPLACED as an event when the cells in range has been replaced, not the contents. In fact, this is exactly what I need. Thank you and I apologize for the noise -andre From: andreas_s at hotmail.com To: fxruby-users at rubyforge.org Subject: Responding to a change in FXTableItem Date: Mon, 19 Jan 2009 18:12:36 +0000 Hello, I''d like my app to response when a cell in my table is changed interactively (responding after the change has been done). For example, I want to pop up a confirmation dialog box. Looking at FXRuby or Fox API for FXTable and FXTableItem does not give me a clue what message FXTableItem or FXTable is sending when such event occurs. What message does it send? Or how can I detect that a cell value has been changed? If the information is available in RDoc, I''d appreciate if you can tell me where to look for, as the page for FXTable or FXTableItem itself does not give me a clue. Thank you in advance -andre Windows Live? Hotmail?: Chat. Store. Share. Do more with mail. Check it out. _________________________________________________________________ Windows Live?: Keep your life in sync. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20090119/a58a4bee/attachment.html>