Changeset 3779:5baa84ac137d in livinglogic.python.xist

Show
Ignore:
Timestamp:
05/10/09 18:29:52 (10 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Add support for float() and iscolor() to jsp.fromul4().

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/ll/xist/ns/jsp.py

    r3773 r3779  
    373373            elif opcode.arg == "int": 
    374374                make_scriptlet("r%d = com.livinglogic.ul4.Utils.toInteger(r%d);" % (opcode.r1, opcode.r2)) 
     375            elif opcode.arg == "float": 
     376                make_scriptlet("r%d = com.livinglogic.ul4.Utils.toFloat(r%d);" % (opcode.r1, opcode.r2)) 
    375377            elif opcode.arg == "bool": 
    376378                make_scriptlet("r%d = com.livinglogic.ul4.Utils.getBool(r%d) ? Boolean.TRUE : Boolean.FALSE;" % (opcode.r1, opcode.r2)) 
     
    396398                make_scriptlet("r%d = ((r%d != null) && (r%d instanceof java.util.Map)) ? Boolean.TRUE : Boolean.FALSE;" % (opcode.r1, opcode.r2, opcode.r2)) 
    397399            elif opcode.arg == "istemplate": 
    398                 make_scriptlet("r%d = ((r%d != null) && (r%d instanceof .livinglogic.ul4.Template)) ? Boolean.TRUE : Boolean.FALSE;" % (opcode.r1, opcode.r2, opcode.r2)) 
     400                make_scriptlet("r%d = ((r%d != null) && (r%d instanceof com.livinglogic.ul4.Template)) ? Boolean.TRUE : Boolean.FALSE;" % (opcode.r1, opcode.r2, opcode.r2)) 
     401            elif opcode.arg == "iscolor": 
     402                make_scriptlet("r%d = ((r%d != null) && (r%d instanceof com.livinglogic.ul4.Color)) ? Boolean.TRUE : Boolean.FALSE;" % (opcode.r1, opcode.r2, opcode.r2)) 
    399403            elif opcode.arg == "chr": 
    400404                make_scriptlet("r%d = com.livinglogic.ul4.Utils.chr(r%d);" % (opcode.r1, opcode.r2))