[Project_owners] xmlterm

Todd Whiteman twhitema at gmail.com
Mon Dec 1 14:06:10 PST 2008


joe ertaba wrote:
> Hi again,
> 
> I built a sample xul from vt100.js
> 
> It doesn't work (some text must show)! can you help to fix it ?

The default xmlns needs to be HTML. As the VT100 code is written with
HTML in mind, then use <xul:hbox> ... to define the XUL elements.


<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>

<xul:window id="yourwindow"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="
     _term_box_element = document.getElementById('term_box');
     _term = new VT100(80, 24, 'term');
     _term.curs_set(true, true, _term_box_element);
     _term.echo();
     _term.write('some text')
">

<script type="text/javascript" src="chrome://vt100_test/content/VT100.js"/>

<script type="text/javascript">
     var _term_box_element = null;
     var _term = null;
</script>

     <xul:vbox flex="1">
         <xul:hbox id="term_box" style="-moz-user-focus: normal;">
             <pre id="term" style="margin: 0 0 0 0; padding: 0
0 0 0; border: medium double rgb(250,0,255)" />
         </xul:hbox>
     </xul:vbox>
     <xul:label value="Put your= XUL here!" onclick=" _term.write('some
text 2')"/>
</xul:window>




Cheers,
Todd



More information about the Project_owners mailing list