From p.dalgaard at biostat.ku.dk  Mon Jul 26 07:26:24 2004
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: Mon Jul 26 07:29:10 2004
Subject: [Rd] tkStartGUI fails under RW1091 (PR#7101)
In-Reply-To: <20040716150938.855B1108BC@slim.kubism.ku.dk>
References: <20040716150938.855B1108BC@slim.kubism.ku.dk>
Message-ID: <x27jsrmj9b.fsf@biostat.ku.dk>

joehl@gmx.de writes:

> > library(tcltk)
> > tkStartGUI()
> Error in .C("RTcl_ActivateConsole", PACKAGE = "tcltk") : 
>         C function name not in DLL for package tcltk

Yes. The source code for that function sits inside #ifndef Win32, so
it's hardly a bug, except that the documentation might be clearer (or
the R wrapper could throw a more explicit error). The whole thing is
quite experimental, on Unix too -- really just a proof of concept
thing at present. 

The fundamental issue is that the way Tk takes over R's event loop
involves redefining ptr_R_ReadConsole and friends. This is quite
Unix-specific and the relevant declarations are lifted from
src/unix/devUI.h. 

I don't know what the equivalent would be on Windows (a platform I use
reluctantly myself), and I kind of suspect that it can only work from
Rterm, not Rgui. Contributions from knowledgeable Windows programmers
would be welcome.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907


[Rd] tkStartGUI fails under RW1091 (PR#7101)
Peter Dalgaard