Changeset 48

Show
Ignore:
Timestamp:
06/18/08 22:48:31 (6 months ago)
Author:
bi..@lilyapp.org
Message:

fix inconsistencies in the input accepted & the behavior of these externs

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lily/lily/chrome/content/externals/check.js

    r1 r48  
    5151        this.inlet1["bang"]=function() { 
    5252                if(checkEl.checked) { 
    53                         checkEl.setAttribute("checked",false); 
     53                        checkEl.removeAttribute("checked"); 
    5454                        thisPtr.outlet1.doOutlet(false); 
    5555                } else { 
    56                         checkEl.setAttribute("checked",true); 
     56                        checkEl.setAttribute("checked","checked"); 
    5757                        thisPtr.outlet1.doOutlet(true); 
    5858                }        
    5959        } 
    6060         
     61        this.inlet1["bool"]=function(msg) { 
     62                if(msg) { 
     63                        checkEl.setAttribute("checked","checked"); 
     64                        thisPtr.outlet1.doOutlet(true); 
     65                } else { 
     66                        checkEl.removeAttribute("checked"); 
     67                        thisPtr.outlet1.doOutlet(false); 
     68                } 
     69        } 
     70         
     71        this.inlet1["num"]=function(val) { 
     72                if(val) { 
     73                        checkEl.setAttribute("checked","checked"); 
     74                        thisPtr.outlet1.doOutlet(true); 
     75                } else { 
     76                        checkEl.removeAttribute("checked"); 
     77                        thisPtr.outlet1.doOutlet(false); 
     78                } 
     79        } 
     80                 
    6181        //custom html 
    6282        this.ui=new LilyObjectView(this,"<input style=\"width:10px;height:10px\" id=\""+ this.createElID("checkbox") +"\" type=\"checkbox\"/>"); 
  • trunk/lily/lily/chrome/content/externals/metro.js

    r1 r48  
    5050         
    5151        this.inlet1["bool"]=function(msg) { 
    52                 if(msg && !running
     52                if(msg
    5353                        start(); 
    5454                else 
     
    5757         
    5858        this.inlet1["num"]=function(val) { 
    59                 if(val && !running
     59                if(val
    6060                        start(); 
    6161                else