Revision: 2995
          http://vexi.svn.sourceforge.net/vexi/?rev=2995&view=rev
Author:   clrg
Date:     2008-07-23 22:56:55 +0000 (Wed, 23 Jul 2008)

Log Message:
-----------
Tidy up codetutor and make it (almost) work

Modified Paths:
--------------
    trunk/apps/org.vexi.codetutor/src/org/vexi/codetutor/codeview.t
    trunk/apps/org.vexi.codetutor/src/org/vexi/codetutor/main.t

Modified: trunk/apps/org.vexi.codetutor/src/org/vexi/codetutor/codeview.t
===================================================================
--- trunk/apps/org.vexi.codetutor/src/org/vexi/codetutor/codeview.t     
2008-07-23 22:56:38 UTC (rev 2994)
+++ trunk/apps/org.vexi.codetutor/src/org/vexi/codetutor/codeview.t     
2008-07-23 22:56:55 UTC (rev 2995)
@@ -9,7 +9,19 @@
         
         thisbox.tabtext = arguments[1];
         
-        var samplestr = vexi.stream.parse.utf8(arguments[0]);
+        var getStream = function(str, stream) {
+            var dot = str.indexOf(".");
+            if (dot==-1) {
+                // FIXME: unclone() required
+                return stream[str+".t"];
+            }
+            return callee(str.substring(dot+1), stream[str.substring(0, dot)]);
+        }
+        
+        var s = getStream(arguments[0], vexi[""]);
+        var samplestr = vexi.stream.parse.utf8(s);
+        vexi.log.info("stream: "+s);
+        vexi.log.info("content: "+samplestr.substring(0, 100));
         var strbyline = samplestr.split('\n');
         var len = strbyline.length;
         for (var i=0; len>i; i++) {

Modified: trunk/apps/org.vexi.codetutor/src/org/vexi/codetutor/main.t
===================================================================
--- trunk/apps/org.vexi.codetutor/src/org/vexi/codetutor/main.t 2008-07-23 
22:56:38 UTC (rev 2994)
+++ trunk/apps/org.vexi.codetutor/src/org/vexi/codetutor/main.t 2008-07-23 
22:56:55 UTC (rev 2995)
@@ -15,10 +15,11 @@
             <ui:box />
         </toolbar>
         <splitpane>
-            <bevel form="down" fill="white" margin="5 0 5 5" orient="vertical" 
padding="0" hshrink="true">
-                <bevel fill="#d4d0c8" form="thinup" text="Tutorials" 
vshrink="true" />
-                <lay:pad padding="5" vshrink="true"><ui:box id="content" 
/></lay:pad>
-                <ui:box />
+            <bevel form="down" fill="white" margin="5 0 5 5" hshrink="true" 
minwidth="150">
+                <scrollpane autohide="true" orient="vertical" padding="5">
+                    <tree id="content" text="Tutorials" />
+                    <ui:box />
+                </scrollpane>
             </bevel>
             <ui:box orient="vertical">
                 <ui:box fill="#eeeeee" vshrink="true">
@@ -72,11 +73,10 @@
         
         var ts = vexi..tutorials;
         for (var k in ts) {
-            vexi.log.info(k);
+            if (k.indexOf(".svn")!=-1) continue;
             var tutorial = .tree(vexi.box);
             tutorial.text = k;
             for (var s in ts[k]) {
-                vexi.log.info(k+", "+s);
                 if (s.indexOf("sample")==0) {
                     var sample = .tree(vexi.box);
                     sample.text = s;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to