Package tcl.lang

Examples of tcl.lang.TclObject


  public Object eval (String source, int lineNo, int columnNo,
          Object oscript) throws BSFException {
  String script = oscript.toString ();
  try {
    interp.eval (script);
    TclObject result = interp.getResult();
    Object internalRep = result.getInternalRep();

    // if the object has a corresponding Java type, unwrap it
    if (internalRep instanceof ReflectObject)
    return ReflectObject.get(interp,result);
    if (internalRep instanceof TclString)
    return result.toString();
    if (internalRep instanceof TclDouble)
    return new Double(TclDouble.get(interp,result));
    if (internalRep instanceof TclInteger)
    return new Integer(TclInteger.get(interp,result));
View Full Code Here


      try {
    interp.eval("package require java");
    interp.eval("set prefix " + hr.prefix);
    interp.eval("set SessionId " + session);

    TclObject server = ReflectObject.newInstance(interp,
      Server.class, hr.server);

    TclUtil.setVar(interp, "server", server, 0);

    if (script != null) {
View Full Code Here

      } else {
    hr.append("\n<!-- server-side Tcl: error code " +
      e.getCompletionCode() + ": " +
      interp.getResult() + " -->\n");
    if (debug) {
        TclObject errorInfo;
        try {
      errorInfo = interp.getVar("errorInfo", null,
        TCL.GLOBAL_ONLY);
        } catch (Exception e2) {
      errorInfo = null;
View Full Code Here

    interp.eval("filter" + " " +
        ReflectObject.newInstance(interp, Request.class, request) +
        " " + ReflectObject.newInstance(interp, MimeHeaders.class,
      headers)
        );
    TclObject res = interp.getVar("content", TCL.GLOBAL_ONLY);
    content =  res.toString().getBytes();
      } catch (TclException e) {
    code = e.getCompletionCode();
    String trace = e.toString();
    // System.out.println("Tcl Oops: "  + code + " " + e);
    if (code == 1) {
View Full Code Here

      }
      interp.eval("process " +
    ReflectObject.newInstance(interp, Properties.class, props));
  } catch (TclException e) {
      if (e.getCompletionCode() == TCL.ERROR) {
    TclObject errorInfo;
    try {
        errorInfo = interp.getVar("errorInfo", null,
          TCL.GLOBAL_ONLY);
    } catch (Exception e2) {
        errorInfo = null;
View Full Code Here

TOP

Related Classes of tcl.lang.TclObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.