zoukankan      html  css  js  c++  java
  • Tips on converting LotusScript to Java


    • Use "null" for checking empty Notes
      objects, the LotusScript NOTHING constant doesn't exist.

    • LotusScript properties are Java
      methods. To convert for java, prefix all property names with Get or Set, and
      append a set of parenthesis
      ,
      (Wayne added: however, property names preceded with
      "Is" or
      "Has" seem not necessarily prefixed with get or set)
      .
    eg., LotusScript db.Title becomes
    db.getTitle()
    LotusScript
    acl.Uniformaccess =
    True
    becomes acl.setUniformAccess(true)

    • You can't use the "extended class
      syntax".
    e.g.,
    LotusScript
    doc.Subject = "Status
    Report
    ", is Java
    doc.appendItemValue("Subject","Status Report").


    • Use the following technique to get
      the array returned from getItemValue.
    vector =
    doc.getItemValue("Field1"); // vector is an array of objects

    (String)vector.elementAt(0); // returns the
    first array element as a string


    This has
    been updated to--
    LotusScript:
    doc.GetItemValue("CustID")(0):: Java: doc.getItemValueString("CustID") - Jamie


    • What do you use for constants? Eg.,
      ACL Level names?

    • Java is case sensitive.
    e.g., doc.save(true,false)
    <- wrong,
    doc.Save(true,false) <-right
    True <-wrong, true <-right
  • 相关阅读:
    MFC CDialog/CDialogEx DoModal ALT
    yum和apt-get用法及区别
    ubuntu 12.04 source.list 源更新
    elasticsearch 优化
    TRIE树
    数据统计经验浅谈
    机器学习
    python 读取libsvm文件
    spark 参数调优
    python中的一些函数
  • 原文地址:https://www.cnblogs.com/hannover/p/2467156.html
Copyright © 2011-2022 走看看