Ignore:
Timestamp:
04/24/05 23:43:57 (15 years ago)
Author:
yermol
Message:

_ddt() trace system now writes to a popup window resulting in much faster execution.
_ddt() messages now identifiy file, line and source of trace message.
_ddt() popup window has "add hr" link
ddtpreprop.php script added to patch in file and line numbers.
full_example-body.html and simple_example.html bugfix to not double-call xinha-init.
simple_example.html now only loads a single Xinha instance.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/unified_backend/examples/simple_example.html

    r72 r84  
    4040  <script type="text/javascript"> 
    4141 
     42  var startupDDT = new DDT( "startup" ); 
     43 
    4244  // uncomment the following if you would like to trace out the  
    4345  // startup functions. This only works in the debugging version 
    4446  // of Xinha_ub, not the runtime. 
    45   // 
    46  
    47   // var startupDDT = new DDT( "startup_trace" ); 
    48   // startupDDT._ddtOnPopup(); 
     47 
     48  startupDDT._ddtOn(); 
    4949 
    5050  </script> 
     
    6969         // at the end.) 
    7070 
     71   startupDDT._ddt( "simple_example.html", "71", "Setting up xinha_init()" ); 
     72 
    7173    xinha_init = xinha_init ? xinha_init : function() 
    7274    { 
     75 
     76           startupDDT._ddt( "simple_example.html", "76", "xinha_init called from window.onload handler for simple_example.html" ); 
     77 
    7378      /** STEP 1 *************************************************************** 
    7479       * First, what are the plugins you will be using in the editors on this 
     
    8893                // by default. 
    8994 
     95           startupDDT._ddt( "simple_example.html", "92", "calling HTMLArea.loadplugins()" ); 
     96 
    9097      if ( !HTMLArea.loadPlugins( xinha_plugins_minimal, xinha_init)) return; 
    9198 
    9299      /** STEP 2 *************************************************************** 
    93100       * Now, what are the names of the textareas you will be turning into 
    94        * editors? 
     101       * editors? For this example we're only loading 1 editor. 
    95102       ************************************************************************/ 
    96103 
    97104      xinha_editors = xinha_editors ? xinha_editors : 
    98105      [ 
    99         'TextArea1', 
    100         'TextArea2' 
     106        'TextArea1' 
    101107      ]; 
    102108 
     
    114120       *************************************************************************/ 
    115121 
     122            startupDDT._ddt( "simple_example.html", "119", "calling HTMLArea.Config()" ); 
     123 
    116124       xinha_config = xinha_config ? xinha_config : new HTMLArea.Config(); 
    117125 
     
    132140       * editors. 
    133141       ************************************************************************/ 
     142 
     143      startupDDT._ddt( "simple_example.html", "140", "calling HTMLArea.makeEditors()" ); 
    134144 
    135145      xinha_editors   = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins_minimal); 
     
    145155       ************************************************************************/ 
    146156 
     157       xinha_editors.TextArea1.config.width  = 700; 
     158       xinha_editors.TextArea1.config.height = 350; 
    147159 
    148160      /** STEP 5 *************************************************************** 
     
    151163       ************************************************************************/ 
    152164 
     165      startupDDT._ddt( "simple_example.html", "160", "calling HTMLArea.startEditors()" ); 
     166 
    153167      HTMLArea.startEditors(xinha_editors); 
    154168 
    155169    }  // end of xinha_init() 
    156170 
    157     window.onload = xinha_init; 
     171    // window.onload = xinha_init; 
     172 
    158173  </script> 
    159174</head> 
     
    177192    <textarea id="TextArea1" name="TextArea1" rows="10" cols="80" style="width:100%"> 
    178193         This is the content of TextArea1 from xinha_ub/examples/simple_example.html.<br> 
    179          The two extra <b>&lt;&gt;</b> buttons on the toolbars are to turn on two sections of  
    180          debugging trace messages. The first turns on trace messages in the HTMLArea 
    181          object which appear in a text area below. The second turns on trace messages in the 
    182          HTMLArea static methods which appear in a popup box. <br><br> 
    183          These trace messages can also be turned on from the simple_example.html file or 
    184          from within htmlarea.js 
    185          </textarea> 
    186          <br> 
    187          <br> 
    188     <textarea id="TextArea2" name="TextArea2" rows="10" cols="80" style="width:100%"> 
    189          This is the content of TextArea2 from xinha_ub/examples/simple_example.html. 
     194         In order to see the new debugging trace messages you will need to turn off 
     195         popup blockers for this site.<br> 
     196         These trace messages can also be turned on/off from within simple_example.html by 
     197         commenting out or uncomments the _ddtOn() line. The same applies to the trace 
     198         messages inside the HTMLArea object in htmlarea.js. 
    190199         </textarea> 
    191200 
Note: See TracChangeset for help on using the changeset viewer.