Container
NotesRichTextItem
ExportRTF
New
refresh
replace
update
| version 1.5
rtItem represents the whole rich text item. It will evenually enable access to functionality for the whole item. At the same time it also returns
rtContainer that allows detailed examination of item structure.
Both functionalities -- that provided by Container and direct methods of
rtItem like Replace or ExportRTF does not act upon the same data. Once the text have been modified using Replace, use Update, before retrieving content using Container. In the same way, in case you have changed data using Container, use
rtContainer.replaceItemValue or Update and Refresh before using
rtItem methods.
Name |
Returns/data type |
Description |
ExportRTF |
|
Exports item content to MS RTF format file |
Replace |
|
Replaces text. Current implementation replaces particular phrase in item text. This method is extremely fast but contains a number of limitations:
* search is always case and pitch sensitive,
* it does not search across formatting boundaries; in some cases editing from Notes client cause text be placed in separate CDTEXT records even if it contains the same formatting -- Replace do not find text that crosses several CDTEXT records.
* it does not allow search/replace that crosses paragraph boundaries.
* it does find only "plain" text, that is it does not replace section titles, button or table labels, etc.
* it does not allow use of wildcards
Note: all these are implemented in Replace of
rtContainer; however that method takes much longer. |
Update |
|
Update writes data back to item so that the document can be saved or Container used to retrieved detailed structure of the item. In case
rtItem itself has not been changed, replaces Notes item value from Container |
Refresh |
|
unconditionally updates
rtItem from underlying Notes item |
|
|
|
Container |
rtContainer |
|
The following table shows coexistance of two ways to manipulate item. Replace and Refresh methods deal only with state of
rtItem object itself. Update method checks if
rtItem has been changed -- if yes updates underlying Notes item, else attempts to replace Notes item with Container content. There is no way to tell if Container has been modified since last retrieved, so if there are no changes in
rtItem itself and Container has been retrieved (via
rtItem.Container property), it is written back.
In case Replace method does not find the target to be replaced
rtItem is not regarder as modified.
|
|
rtItem |
rtItem.Container |
Method |
State before command |
not initialized |
as last retrieved |
modified |
not initialized |
as last retrieved |
modified |
Replace |
|
initializes and modifies |
modifies |
modifies |
- |
- |
- |
Update |
|
- |
- |
updates underlying item |
- |
updates Notes item if
rtItem is uptodate |
updates Notes item if
rtItem is uptodate |
Refresh |
|
initializes |
refreshes |
refreshes |
- |
- |
- |
ExportRTF |
|
- |
- |
updates underlying item |
- |
- |
- |
Quick replace
|