Tips on converting LotusScript to Java
2012-04-23 22:02
411 查看
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
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
相关文章推荐
- LotusScript Class to do client or server side FTP on Win32 platform. FTP using script and wininet.dll.
- How to run a Java Program as a daemon (service) on Linux (openSUSE) using a shell script
- java.lang.NullPointerException: Attempt to invoke virtual method .....on a null object reference
- Limits on numeric data representation in LotusScript
- ant 手动打包报错: com.sun.tools.javac.Main is not on the classpPerhaps JAVA_HOME does not point to the JDK
- java.net.ConnectException: Call From localhost/127.0.0.1 to localhost:8020 failed on connection
- [Java] Access restriction: The type FtpClient is not accessible due torestriction on required librar
- Java Tips and Best practices to avoid NullPointerException in Java Applications
- 7 TIPS ON HOW TO BECOME A FULL STACK DEVELOPER!
- Hadoop eclipse开发解决Call to localhost/127.0.0.1:9000 failed on local exception: java.io.EOFException
- Attaching the Script debugger to process ‘[****]’ on machine **** failed.
- Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null objec
- How to dynamically display the tips or help on the text box
- 【明哥报错簿】之【 "javax.servlet.http.HttpServlet" was not found on the Java Build Path || HttpServletRequest/HttpServletResponse cannot be resolved to a type】
- 20 Tips to Optimize your ActionScript
- Limits on array variables in LotusScript
- How to install the Sun Java JDK on Ubuntu 10.10
- PowerShell Script to Deploy Multiple VM on Azure in Parallel #azure #powershell
- java 错误:Access restriction: The type Resource is not accessible due to restriction on required library
- How to Install Oracle Java JDK on Ubuntu Linux