Displaying 6 results from an estimated 6 matches for "consoleprompt".
1999 Mar 25
4
readline() (PR#147)
Dear R developers,
I have found the following bug with readline() in R 0.63.3:
if you execute the menu-function and then the readline() function, then
readline() prompts "Selection:"
> a <- readline()
hello
> a
[1] "hallo"
> a <- menu(c("a", "b"), title="bitte:")
bitte:
1:a
2:b
Selection: 2
> a <- readline()
Selection:
1998 Mar 09
1
bug in menu, readline
Neither do_menu nor do_readln (in src/main/scan.c) call the function
InitConsoleGetchar. They need to do this to reset ConsolePrompt. If you
use "scan" to read in data from the terminal, then ConsolePrompt is set
to "n:" for some integer n and this prompt makes an unwelcome appearance
when you use the "menu" or "readline" functions.
Incidentally, could we have a "title" argumen...
1997 Dec 31
0
R-beta: small patch for R-0.61 on SGI Irix 5.3
...the same
problem, which appears to be fixed by the following patch:
*** scan.c.000 Fri Nov 21 00:06:43 1997
--- scan.c Wed Dec 31 12:11:05 1997
***************
*** 27,33 ****
static char ConsoleBuf[CONSOLE_BUFFER_SIZE];
static char *ConsoleBufp;
! static char ConsoleBufCnt;
static char ConsolePrompt[32];
static void InitConsoleGetchar()
--- 27,33 ----
static char ConsoleBuf[CONSOLE_BUFFER_SIZE];
static char *ConsoleBufp;
! static int ConsoleBufCnt;
static char ConsolePrompt[32];
static void InitConsoleGetchar()
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-....
2016 Sep 16
1
getGraphicsEvent() questions, minor feature/tweak request, and patch(es).
...the graphics window, or NA for no prompt}
\item{onMouseDown}{a function to respond to mouse clicks}
\item{onMouseMove}{a function to respond to mouse movement}
\item{onMouseUp}{a function to respond to mouse button releases}
\item{onKeybd}{a function to respond to key presses}
- \item{consolePrompt}{prompt to be displayed to the user in the console}
+ \item{consolePrompt}{prompt to be displayed to the user in the console, or NA for no prompt}
\item{which}{which graphics device does the call apply to?}
\item{...}{items including handlers to be placed in the event environment}
\item{e...
2020 Aug 09
0
Interactive graphics
...el list members
I'm facing as problem already known and linked to the use of
getGraphicsEvent(prompt = "Waiting for input",
???????????????? onMouseDown = NULL, onMouseMove = NULL,
???????????????? onMouseUp = NULL, onKeybd = NULL,
???????????????? onIdle = NULL,
???????????????? consolePrompt = prompt)
setGraphicsEventHandlers(which = dev.cur(), ...)
getGraphicsEventEnv(which = dev.cur())
setGraphicsEventEnv(which = dev.cur(), env)
The problem rises when trying to get interrupts generated by pressing
mouse buttons and, at the same time, interrupts coming from widgets. The
idea is to...
2012 Jan 13
0
WISHLIST: Be able to timeout readline()/stdin via setTimeLimit in all consoles
...amp; c != R_EOF) {
if (bufp >= &buffer[MAXELTSIZE - 2]) continue;
*bufp++ = c;
}
...
}
with ConsoleGetchar():
/* used by readline() and menu() */
static int ConsoleGetchar(void)
{
if (--ConsoleBufCnt < 0) {
ConsoleBuf[CONSOLE_BUFFER_SIZE] = '\0';
if (R_ReadConsole(ConsolePrompt, ConsoleBuf,
CONSOLE_BUFFER_SIZE, 0) == 0) {
R_ClearerrConsole();
return R_EOF;
}
ConsoleBufp = ConsoleBuf;
ConsoleBufCnt = strlen((char *)ConsoleBuf);
ConsoleBufCnt--;
}
/* at this point we need to use unsigned char or similar */
return (int) *ConsoleBufp++;
}
where...