Changeset 17019 for lang/actionscript

Show
Ignore:
Timestamp:
08/03/08 15:53:48 (4 months ago)
Author:
hoge1e3
Message:
 
Location:
lang/actionscript/todoshare
Files:
2 added
5 modified

Legend:

Unmodified
Added
Removed
  • lang/actionscript/todoshare/index.cgi

    r16713 r17019  
    2424       link("todoJS.cgi","Todo(JS)"), 
    2525       link("nohada.cgi","のはだ"), 
     26       link("netacho.html","ネタ帳"), 
    2627       link("swkText.cgi","SWK(Text Mode)"), 
    2728       link("DBConsoleFlash.html","SWK(Flash Mode)"), 
  • lang/actionscript/todoshare/js/common.js

    r17005 r17019  
    1515                } 
    1616   }); 
     17} 
     18function isArray(o) { 
     19  return o instanceof Array; 
     20} 
     21function isFunc(o) { 
     22  return o instanceof Function; 
     23} 
     24function isHash(e) { 
     25  return typeof(e)=="object" && !isFunc(e) && !isArray(e); 
    1726} 
    1827function dbPut(query,after) { 
  • lang/actionscript/todoshare/js/jsonScr.js

    r17006 r17019  
    5454  return isFunc(o) && o.async; 
    5555} 
    56 function isArray(o) { 
    57   return o instanceof Array; 
    58 } 
    59 function isFunc(o) { 
    60   return o instanceof Function; 
    61 } 
     56 
    6257function isObj(o) { 
    6358  return typeof(o)=="object"; 
    6459}  
    65 function isHash(e) { 
    66   return isObj(e) && !isFunc(e) && !isArray(e); 
    67 } 
     60 
    6861// compilePrimitive :: value -> (this->void) -> (this->void) 
    6962function compilePrimitive(value,next) { 
     
    146139} 
    147140function gv(name) { 
    148    return function () {return this[name];}; 
    149    print ("gv ",name," ",this[name]," ",this.flag); 
    150    this._=this[name]; 
    151    print ("gvres ",this._); 
    152    return this._; 
     141   return [ 
     142      function () {return this[name];} 
     143   ]; 
    153144} 
    154145function traceCall(t,args) { 
  • lang/actionscript/todoshare/js/tag.js

    r17005 r17019  
    4444           target.addEventListener(i.substring(2).toLowerCase(),o[i],false); 
    4545        } else { 
    46            target.attachEvent(i,o[i]); 
     46           target.attachEvent(i.toLowerCase(),o[i]); 
    4747        } 
    4848     } else { 
  • lang/actionscript/todoshare/netacho.html

    r17007 r17019  
    77<script src="js/jsonScr.js"></script> 
    88<script src="js/tag.js"></script> 
     9<script src="js/gui.js"></script> 
    910<script>  
    1011except=function(e) { print("Error - ",e); }; 
     
    1213function addn() { 
    1314  print ("Addn neta"); 
    14   var qo={"class":"Neta", content:$("neta").value}; 
     15  // class: IE regards as reserved word 
     16  var qo={category:"Neta", content:$("neta").value}; 
    1517  var holder=printNeta(qo.content); 
    1618  progn([dbPut,qo], 
     
    2628  //print ("Add neta ",qo,qo.content); 
    2729  holder.innerHTML=""; 
    28   var del=compile( 
     30  var del=[ 
    2931     [dbDel, qo.id], 
    3032     [rmHolder,holder] 
    31   ); 
     33  ]; 
    3234  elem(holder,[   
    3335       "span", 
    3436          " id= ", qo.id , 
    3537          " content= ", qo.content , 
    36          ["button",{onClick: del},"削除"],["br"] 
     38         [abutton,{onClick: del},"削除"],["br"] 
    3739  ]); 
    3840} 
     
    4345} 
    4446function listAll() { 
    45   var qo={"class":"Neta", content:["*"]}; 
     47  var qo={category:"Neta", content:["*"]}; 
    4648  var c=compile( 
    4749    [dbGet,qo], 
    4850    [each,function (neta) { 
    49         print (neta); 
    50  //       var holder=printNeta(""); 
    51  //       neta1(holder,neta); 
     51 //       print (neta); 
     52        var holder=printNeta(""); 
     53        neta1(holder,neta); 
    5254    }] 
    5355  ); 
     
    6062</head> 
    6163<body onload="listAll()"> 
    62 <input type=text id=neta length=50> 
     64<input type=text id=neta size=50> 
    6365<button onClick="addn()">Add</Button><HR> 
    64 <span id="list"></span><BR> 
     66<span id="list"></span> 
     67<HR> 
     68<a href="./">Home</a><BR> 
    6569<span id="console"></span> 
    6670</body>