![]() Chapter Contents |
![]() Previous |
![]() Next |
| Text Viewer: _setDelimiters |
| Syntax | |
| Details | |
| Example |
Syntax |
| CALL NOTIFY (viewer-name, '_setDelimiters', list-id); |
| Argument | Type | Description |
|---|---|---|
| list-id |
N | specifies the identifier of an SCL list containing one or more delimiters |
| Details |
The delimiters list controls what word is returned by the _getInfo method. The default delimiters list contains only a space. You may use more than one delimiter, and delimiters may be longer than one character.
| Example |
This example sets the delimiters to * and $$ and returns the words surrounded by these characters:
/* create the delimiters list */
delimiters = makelist();
rc = insertc(delimiters, "*");
rc = insertc(delimiters, "$$");
/* assign the delimiters list to the
viewer */
call notify('textview', '_set_delimiters_',
delimiters);
textview:
call notify ('textview', '_get_info_', row,
col, text, textl,
word, wordl);
return;
Suppose the text viewer contains this line:
one*two$$three*four$five$$six
If the user clicks on the word "two", the _getInfo method returns these values:
| WORD = "two" | |
| WORDL = 3 |
If the user clicks on the word "four", the _getInfo method returns these values:
| WORD = "four$five" | |
| WORDL = 9 |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.