[TxMt] Re: error messages - R-Bundle

Berend Hasselman bhh at xs4all.nl
Fri Feb 3 18:27:28 UTC 2012


On 03-02-2012, at 19:13, Hans-Jörg Bibiko wrote:

> Hi,
> 
> yes, as Berend said, this issue is a bit weird to me.
> 
> Would it be possible to post a piece of R code which causes this? I tried to reproduce it but up to now without success.
> 
> Berend just wrapped the line in question by an exception catcher which should solve that effect but not the actual reason.
> 
> Thus for the time being you can change in tmR.rb in the following way:
> 
> from:
> 
>    elsif io == stdout
>      print hideStartMessageJS
> 
> to:
> 
> 
>    elsif io == stdout
>      begin
>        print hideStartMessageJS
>      rescue
>      end
> 
> 
> [It seems to me that one should rewrite the code by using another scripting language - private opinion :) ]



Our R code or the R bundle?  :-)

But I have also found that it doesn't completely solve the issue.
I have now done this

    elsif io == stdout
      begin
        str.each_line do |line|
         .... 
         ....
        end
      rescue
        sleep(0.1)
      end
   end

(I've attached my version of tmR.rb)

I have wrapped the large block of code earlier on in tmR.rb in a begin/rescue/end block.
But now the R bundle sometimes skips R output.
The sleep(0.1) may be too long.

It's a mystery. It started sometime ago (maybe an OS update?)

Berend

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tmR.rb
Type: text/x-ruby-script
Size: 7891 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20120203/0be4fe90/attachment.rb>


More information about the textmate mailing list