[TxMt] TextMate.system() (in the HTML output window) max data size?

Hans-Joerg Bibiko bibiko at eva.mpg.de
Wed Dec 12 10:46:18 UTC 2007


On 12 Dec 2007, at 11:21, Allan Odgaard wrote:
> On 12 Dec 2007, at 11:08, Hans-Joerg Bibiko wrote:
>> [...]
>> Is it true that TextMate.system(task) (in the HTML output window)  
>> don't retrieve the entire data coming from the task?
>> Or in other words; is there a limit of 8kB?
>
> There _was_ a bug that would cause it to not get more than the  
> first 8 KB (page size) or some such. But it should have been fixed.
Hmm. Very weird.

I have the following JS/HTML code and it runs in the HTML output pane  
of TM:

function foo() {
	var cmd = 'cat "$HOME/afile"'
	myCommand = TextMate.system(cmd, function (task) { });
	myCommand.onreadoutput = output;
}

function output (str) {
	document.getElementById("main").innerHTML = "<pre><span style='font- 
size:9pt'>" + str + "</span></pre>";
}

If I execute foo() (I press a button to invoke foo) I only see some  
of the end of "$HOME/afile" !AND! the output's size depends on the  
total size of "$HOME/afile".

Is there something wrong with my code? I cannot see the point.

--Hans

## Appendix

Example 1:

if "$HOME/afile" contains:

      1  abcdefghijklmnopqrstuvwxyz
      2  abcdefghijklmnopqrstuvwxyz
      3  abcdefghijklmnopqrstuvwxyz
...
   1998  abcdefghijklmnopqrstuvwxyz

I only see:

jklmnopqrstuvwxyz
   1991  abcdefghijklmnopqrstuvwxyz
   1992  abcdefghijklmnopqrstuvwxyz
   1993  abcdefghijklmnopqrstuvwxyz
   1994  abcdefghijklmnopqrstuvwxyz
   1995  abcdefghijklmnopqrstuvwxyz
   1996  abcdefghijklmnopqrstuvwxyz
   1997  abcdefghijklmnopqrstuvwxyz
   1998  abcdefghijklmnopqrstuvwxyz


Example 2:

if "$HOME/afile" contains:

      1  abcdefghijklmnopqrstuvwxyz
      2  abcdefghijklmnopqrstuvwxyz
      3  abcdefghijklmnopqrstuvwxyz
...
   1880  abcdefghijklmnopqrstuvwxyz

I only see:

ijklmnopqrstuvwxyz
   1874  abcdefghijklmnopqrstuvwxyz
   1875  abcdefghijklmnopqrstuvwxyz
   1876  abcdefghijklmnopqrstuvwxyz
   1877  abcdefghijklmnopqrstuvwxyz
   1878  abcdefghijklmnopqrstuvwxyz
   1879  abcdefghijklmnopqrstuvwxyz
   1880  abcdefghijklmnopqrstuvwxyz

Example 3:

if "$HOME/afile" contains:

      1  abcdefghijklmnopqrstuvwxyz
      2  abcdefghijklmnopqrstuvwxyz
      3  abcdefghijklmnopqrstuvwxyz
...
   1809  abcdefghijklmnopqrstuvwxyz

I only see:

hijklmnopqrstuvwxyz
   1758  abcdefghijklmnopqrstuvwxyz
   1759  abcdefghijklmnopqrstuvwxyz
   1760  abcdefghijklmnopqrstuvwxyz
   1761  abcdefghijklmnopqrstuvwxyz
   1762  abcdefghijklmnopqrstuvwxyz
   1763  abcdefghijklmnopqrstuvwxyz
   1764  abcdefghijklmnopqrstuvwxyz
   1765  abcdefghijklmnopqrstuvwxyz
   1766  abcdefghijklmnopqrstuvwxyz
   1767  abcdefghijklmnopqrstuvwxyz
   1768  abcdefghijklmnopqrstuvwxyz
   1769  abcdefghijklmnopqrstuvwxyz
   1770  abcdefghijklmnopqrstuvwxyz
   1771  abcdefghijklmnopqrstuvwxyz
   1772  abcdefghijklmnopqrstuvwxyz
   1773  abcdefghijklmnopqrstuvwxyz
   1774  abcdefghijklmnopqrstuvwxyz
   1775  abcdefghijklmnopqrstuvwxyz
   1776  abcdefghijklmnopqrstuvwxyz
   1777  abcdefghijklmnopqrstuvwxyz
   1778  abcdefghijklmnopqrstuvwxyz
   1779  abcdefghijklmnopqrstuvwxyz
   1780  abcdefghijklmnopqrstuvwxyz
   1781  abcdefghijklmnopqrstuvwxyz
   1782  abcdefghijklmnopqrstuvwxyz
   1783  abcdefghijklmnopqrstuvwxyz
   1784  abcdefghijklmnopqrstuvwxyz
   1785  abcdefghijklmnopqrstuvwxyz
   1786  abcdefghijklmnopqrstuvwxyz
   1787  abcdefghijklmnopqrstuvwxyz
   1788  abcdefghijklmnopqrstuvwxyz
   1789  abcdefghijklmnopqrstuvwxyz
   1790  abcdefghijklmnopqrstuvwxyz
   1791  abcdefghijklmnopqrstuvwxyz
   1792  abcdefghijklmnopqrstuvwxyz
   1793  abcdefghijklmnopqrstuvwxyz
   1794  abcdefghijklmnopqrstuvwxyz
   1795  abcdefghijklmnopqrstuvwxyz
   1796  abcdefghijklmnopqrstuvwxyz
   1797  abcdefghijklmnopqrstuvwxyz
   1798  abcdefghijklmnopqrstuvwxyz
   1799  abcdefghijklmnopqrstuvwxyz
   1800  abcdefghijklmnopqrstuvwxyz
   1801  abcdefghijklmnopqrstuvwxyz
   1802  abcdefghijklmnopqrstuvwxyz
   1803  abcdefghijklmnopqrstuvwxyz
   1804  abcdefghijklmnopqrstuvwxyz
   1805  abcdefghijklmnopqrstuvwxyz
   1806  abcdefghijklmnopqrstuvwxyz
   1807  abcdefghijklmnopqrstuvwxyz
   1808  abcdefghijklmnopqrstuvwxyz
   1809  abcdefghijklmnopqrstuvwxyz



More information about the textmate mailing list