|
ds_SetObjectComments |
|---|
| ds_SetObjectComments (selector; ID; fieldID; newComment {; newStyle}) <- errorCode | |||
|---|---|---|---|
| Parameter | Type | Description | |
| -> | selector | Integer | selector |
| -> | ID | Integer | Object ID |
| -> | FieldID | Integer | Field number |
| -> | newComment | Text | Comment |
| <- | errorCode | Long Integer | Error Code (0 = no error) |
Add a comment to an object. To remove the comment, pass an empty string.
See ds_GetObjectComments to have the different posible values for the selector.
New in version 1.1 : blobStyl
If passed, blobStyl must be a valid "styl" Macintosh stylized text descrption. Note that this will probably done by copying stylized text in a 4D Write area. This is the only way to get a valid "styl" under Window. So, usually, the developer will use 4D Write as a "comment editor", and once the comment is writtnt, he/she can select the comment, copy it, and read the clipboard before changing the comment:
| Sample Code |
|---|
| C_BLOB($styl) |
| SET BLOB SIZE($newStyle;0) |
| C_TEXT($newStyle) |
| $newComment:=Get text from clipboard |
| GET CLIPBOARD("styl";$newStyle) |
| $L_err:=ds_SetObjectComment (kds_ObjectComment; methodID; 0; $newComment; $newStyle) |