[Fxruby-users] Scintilla FXDataTarget Bug?
Status: Inactive
Brought to you by:
lyle
From: Joseph <rub...@te...> - 2004-06-17 02:03:40
|
Hi. Jeroen, thanks for enlightening me (in more detail) to layout management and FXSplitter. It came in handy. A new problem: I was experimenting with FXDataTarget, FXText, and FXScintilla. The FXScintilla widget does not appear to be working with FXDataTarget objects. In Detail (code follows below) I have a FXText widget, and a FXScintilla widget. Each is connected to its own FXDataTarget instance. I initialize the two FXDataTarget instances to a static value, and then implement a button handler that prints out the value of both FXDataTarget instances. 1. The static text assigned to the DataTarget associated with the FXText instance is displayed in the FXText widget, however, FXScintilla does not display the text assigned to the DataTarget associated with the FXScintilla widget. 2. If I type something into both the FXText widget, as well as the FXScintilla widget, then the DataTarget associated with the FXText now contains the text that was entered interactively, whereas the DataTarget prints the text that was originally assigned to the DataTarget programmatically. I.e. if I hit the "Print" button, then the new value is printed for the FXText DataTarget, but the Scintilla DataTarget does not print the modified contents that was typed into the Scintilla widget. Is FXScintilla forgetting to update the associated FXDataTarget instance? Here are the code snippets, plus results: #>>>>>>>>>>>>> @textTarget = FXDataTarget.new("") @msgTarget = FXDataTarget.new("") @msgTarget.value = "static msgTest value" @textTarget.value = "static testTarget value" printButton = FXButton.new(buttons, "&Print") printButton.connect(SEL_COMMAND) do |sender, selector, data| print "@textTarget.value = [" + @textTarget.value + "]\n" print "@msgTarget.value = [" + @msgTarget.value + "]\n" end @tx = FXText.new(textframe, @textTarget, FXDataTarget::ID_VALUE, TEXT_WORDWRAP | LAYOUT_SIDE_TOP | LAYOUT_FILL_X | LAYOUT_FILL_Y) @sctl = FXScintilla.new(sctlframe, @msgTarget, FXDataTarget::ID_VALUE, LAYOUT_SIDE_TOP | LAYOUT_FILL_X | LAYOUT_FILL_Y) #<<<<<<<<<<<<< @textTarget.value = [FXText test] @msgTarget.value = [static msgTest value] Any ideas? TIA, Joseph |