FAQ for RwxWidgets Package

  • I'm running on Mac OS X using the console, and I can create windows, but they are always in the background and don't respond to events. I basically get the spinning beachball. What's the problem?
    Well, I am working on trying to find a way to avoid this. However, it may simply be the way things are, but I rarely accept that.
    But the good news is that if you run R via the "standard" GUI in the R dmg file, the RwxWidgets tools will work just fine. You can run one of the scripts and enter the event loop. Then, when you close that window by deleting it with the red X button on the frame, you will get the prompt back. It is not ideal, but it does allow us to test RwxWidgets.
  • I am working on Linux and when I bring up an HTML document using the wxHTML widget, I get an error dialog about the encoding. How can I get rid of these?
    Configure the wxWidgets build with --enable-unicode, untar the source and run the command
            ./configure --enable-unicode ; make
    
    from within the top-level directory of the wxWidgets source tree.
  • When I try to run RwxWidgets within a debugger, I get problems starting the R process or laoding the package.
    It is probably best to compile wxWidgets without support for threads. Do this with
            ./configure --enable-threads=no --enable-joystick=no ; make
    
  • I have a method for handling HTML links using the OnLinkClicked method for wxHtmlWindow. But when the method gets called, I can't use the wxHtmlLinkInfo object as expected, e.g. link$GetHref() doesn't work. What's the problem?
    The issue is that wxHtmlLinkInfo is not a dynamic class, i.e. we cannot ask the C++ instance about its class information. This is an implementation choice for wxWidgets and leaves us without the ability to dynamically determine the class of the object and so find its methods implicitly via $. Rather, you have to call the methods explicitly, e.g. wxHtmlLinkInfo_GetHref(info) or as(info, "wxHtmlLinkInfo")$GetHref(). If you are going to make repeated use of the object, then doing the coercion and assigning the result to a variable in R and then calling the methods may be convenient, e.g.
           info = as(info, "wxHtmlLinkInfo")
           info$GetHref()
          

  • Duncan Temple Lang <duncan@wald.ucdavis.edu>
    Last modified: Sat Dec 9 13:48:22 PST 2006