[Rd] Odd tcltk and Rattle interference on MS/Windows

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun Apr 6 08:09:18 CEST 2008


I don't recognize your account.

R under Windows has an entry point R_tcldo, which is *private* and (as its 
name implies) for use by R with Tcl.  There is no documentation that I am 
aware of that suggests that it is available to packages, and it is in no 
header and not in 'Writing R Extensions'.  It is not part of the 'Windows 
GUI': it works the same with all R for Windows front ends.


On Sat, 5 Apr 2008, Michael Lawrence wrote:

> Hi Graham,
>
> Your guess is right. The event loop stuff is handled differently on Windows
> than on Unix-like OSes. There is a hook, called tcl_do that is hard-coded
> into the R Windows GUI. It is called whenever the console is idle. RGtk2 is
> able to hook into that to process GTK+ events. The problem is that the two
> packages replace each other's handler. So in this case tcltk is blocking
> GTK+ from processing its events.
>
> Perhaps these packages should "chain up" to an existing handler. I'll do
> that for RGtk2, but I have no control over tcltk of course.
>
> Michael
>
> On Sat, Apr 5, 2008 at 3:57 AM, Graham Williams <
> Graham.Williams at togaware.com> wrote:
>
>> Hi Michael,
>>
>> I'm not sure if this is RGtk2 related yet, but just in case it rang
>> any bells with you.... I'm using version 2.12.5 on R 2.6.2.
>>
>> On MS/Windows (not on GNU/Linux) if the tcltk package is loaded whilst
>> Rattle is running, Rattle freezes (or is running exceedingly
>> slowly). If tcltk is loaded before Rattle is started, all is okay!
>>
>> I.e., The following order of things works just fine:
>>
>>> library(rattle)
>>> library(tcltk)
>>> rattle()
>>
>> But the following freezes Rattle:
>>
>>> library(rattle)
>>> rattle()
>>> library(tcltk)
>>
>> I'm thinking it is an issue between RGtk2 and tcltk, but don't have
>> any good evidence yet. However, pmg is also affected in exactly the
>> same way, viz:
>>
>>> library(tcltk)
>>> library(pmg)
>>
>> works just fine but
>>
>>> library(pmg)
>>> library(tcltk)
>>
>> results in pmg freezing.
>>
>> Any ideas - is it perhaps tcltk's problem?
>>
>> Regards,
>> Graham
>>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list