[TxMt] tm_interactive_input question

Luke Daley ld at ldaley.com
Wed Apr 9 23:36:55 UTC 2008


On 10/04/2008, at 8:20 AM, Hans-Jörg Bibiko wrote:

> It seems that R (R running as daemon via spawn in an hidden pty)  
> distinguishes between a 'read' coming from pipe as 'keyboard input'  
> and the R command 'readline' which reads something from the  
> keyboard. This led me to the assumption to use tm_interactive_input  
> to solve a tiny problem - meaning whenever R executes the command  
> readline, tm_interactive_input pops up a dialog to enter something.

Are you saying that you get false positives here? i.e. the  dialog is  
opening when you don't want it to? If so I will need to understand  
what you are doing more before I can work out how to fix.

> If there is a way to get rid of it - and there're a very few not  
> only theoretical indications - then it would be nice not only to  
> label the buttons but also to show only one button or even a NIB . ;)

I get the feeling that your particular usage here will be a bit  
niche. To that end, you might be better off ripping the  
tm_interactive_input code and modifying it to suit your needs. I'll  
certainly help you out if you go that path.

> [or a third button which kills the running process]

Possible, but not desirable in the general case so probably is a  
point for my previous comment.

> But back to the reality, I mean to be able to label the 'Send'  
> button would be fine for now.

This is easy enough.


I'll be interested to see what Allan thinks, but we may need to give  
some thought to making this mechanism more generic. Essentially  
providing a skeletal lib which provides the common stuff (and the  
majority of the work) and allow people with customised needs to use a  
different auxillary lib which provides the behaviour. How you would  
even do that in C is not really evident to me but I think we could  
make it work.

LD.






More information about the textmate mailing list