I have an FXText window which I would like to force to be repainted immediately, not wait for the lazy re-paint. I have a call to repaint() for the FXText window and for the FXApp. The documentation for FXApp.repaint says "Paint all windows marked for repainting. On return all the applications windows have been painted". I take that to mean (or hope that it means) that this a synchronous call, and your program should wait for the repaint to complete. However that clearly is not the case - the window gets repainted some considerable time later. There is no documentation of a repaint method for FXText, nor for its parent FXScrollArea. FXScrollArea''s parent is Object, so I am not at all sure from which class FXText gets a repaint method. Does anyone know do I force a (synchronous) repaint? Thanks. Dave ____________________________________________________________ David C. Toll, Research Staff Member, Secure Embedded Systems IBM T. J. Watson Research Center, 19 Skyline Drive, Hawthorne NY 10532 Phone: 914-784-7019 (t/l 863) Fax: 914-784-6205 (t/l 863) email: toll at us.ibm.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20081027/9427e1e2/attachment.html>
I have an FXText window which I would like to force to be repainted immediately, not wait for the lazy re-paint. I have a call to repaint() for the FXText window and for the FXApp. The documentation for FXApp.repaint says "Paint all windows marked for repainting. On return all the applications windows have been painted". I take that to mean (or hope that it means) that this a synchronous call, and your program should wait for the repaint to complete. However that clearly is not the case - the window gets repainted some considerable time later. There is no documentation of a repaint method for FXText, nor for its parent FXScrollArea. FXScrollArea''s parent is Object, so I am not at all sure from which class FXText gets a repaint method. Does anyone know do I force a (synchronous) repaint? Thanks. Dave ____________________________________________________________ David C. Toll, Research Staff Member, Secure Embedded Systems IBM T. J. Watson Research Center, 19 Skyline Drive, Hawthorne NY 10532 Phone: 914-784-7019 (t/l 863) Fax: 914-784-6205 (t/l 863) email: toll at us.ibm.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20081029/24bf2236/attachment.html>
On Oct 29, 2008, at 1:40 PM, David Toll wrote:> I have an FXText window which I would like to force to be repainted > immediately, not wait for the lazy re-paint. > > I have a call to repaint() for the FXText window and for the FXApp. > > The documentation for FXApp.repaint says "Paint all windows marked > for repainting. On return all the applications windows have been > painted". I take that to mean (or hope that it means) that this a > synchronous call, and your program should wait for the repaint to > complete. However that clearly is not the case - the window gets > repainted some considerable time later.This question is addressed in the FAQ: http://www.fox-toolkit.org/faq.html#CLIENTSERVER I think you should be able to call update() on the FXText window (to mark it as dirty and in need of a repaint), followed by a call to FXApp#flush to immediately flush all drawing commands to the display.> There is no documentation of a repaint method for FXText, nor for > its parent FXScrollArea. FXScrollArea''s parent is Object, so I am > not at all sure from which class FXText gets a repaint method.Actually, FXScrollArea''s base class is FXComposite, not FXObject: http://www.fxruby.org/doc/api/classes/Fox/FXScrollArea.html Hope this helps, Lyle --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available from the Pragmatic Bookshelf! http://www.pragprog.com/titles/fxruby -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20081029/95ad6c62/attachment-0001.html>
Lyle: Thanks for the suggestion. Unfortunately, it makes no difference. However, I think we are looking for the wrong problem. I can make it effectively make my FXRuby program perform the following, repeated 16 times: printf("hi\n") to the FXText window sleep(3) If I run this then all is well. However, if I concurrently run two copies of this program, from separate DOS-type command windows, then neither of them updates properly until both of the programs terminate the above sequence and re-enter command -input mode. I.e. it would appear that my problem is that, somehow, multiple FXRuby programs, running concurrently on the same copy of Windows, interfere with each other. I think this requires a deep understanding of how FXRuby works underneath, maybe requires an understanding of its interaction with Windows (Windows XP in this case). Thanks Dave ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- On Oct 29, 2008, at 1:40 PM, David Toll wrote: I have an FXText window which I would like to force to be repainted immediately, not wait for the lazy re-paint. I have a call to repaint() for the FXText window and for the FXApp. The documentation for FXApp.repaint says "Paint all windows marked for repainting. On return all the applications windows have been painted". I take that to mean (or hope that it means) that this a synchronous call, and your program should wait for the repaint to complete. However that clearly is not the case - the window gets repainted some considerable time later. This question is addressed in the FAQ: http://www.fox-toolkit.org/faq.html#CLIENTSERVER I think you should be able to call update() on the FXText window (to mark it as dirty and in need of a repaint), followed by a call to FXApp#flush to immediately flush all drawing commands to the display. There is no documentation of a repaint method for FXText, nor for its parent FXScrollArea. FXScrollArea''s parent is Object, so I am not at all sure from which class FXText gets a repaint method. Actually, FXScrollArea''s base class is FXComposite, not FXObject: http://www.fxruby.org/doc/api/classes/Fox/FXScrollArea.html Hope this helps, Lyle --- "FXRuby: Create Lean and Mean GUIs with Ruby" Now available from the Pragmatic Bookshelf! http://www.pragprog.com/titles/fxruby _______________________________________________ fxruby-users mailing list fxruby-users at rubyforge.org http://rubyforge.org/mailman/listinfo/fxruby-users -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20081030/4fcf749f/attachment.html>