一、关于appenditemvalue
试试下面这个简单的例子:
dim ws as new notesuiworkspace
dim uidoc as notesuidocument
dim doc as notesdocument
set uidoc=ws.currentdocument
set doc=uidoc.document
for i=1 to 10
call doc.appenditemvalue("myitem",i)
next
call doc.save(true,true )
这个程序用以对当前文档增加10个item,名字都叫myitem,但值从1到10不等。结果如何?用调试方式进行观察,发现:确实增加了10个item,名字都叫myitem,但值却都是1!这与notes中的帮助不符。帮助里宣称:
if the document already has an item called itemname$, appenditemva
lue does not replace it.
instead, it creates another item of the same name, and gives it th
e value you specify.
^^^^^^^^^^^^^^^^^^^^
从4.6到5.0结果都一样。
二、区分notes的前台类与后台类
由于两者的使用范围不一,在写程序时应注意这一点,尤其写代理时。如果在后台服务器运行的代理里加一句:
dim ws as new notesuiworkspace
代理运行日志报错:unkown error.
三、关于notes与ole的共享域