InsertProfileCriteria Method (Profile Editor Control)
Windows - Visual C++
Description
The InsertProfileCriteria method
translates the specified RPN expression to InFix notation and
replaces the current editing window selection with the resultant
expression. Use InsertProfileCriteria when loading an entire profile
into the editor. InsertProfileCriteria will make ambiguous butnots global.
Syntax
long result = InsertProfileCriteria(LPCTSTR strRPN);
The InsertProfileCriteria syntax has these parts:
Part |
Description |
strRPN |
A string containing an RPN search expression. |
result |
A long integer containing 0, if the operation succeeded, or an error code, otherwise. |
Remarks
If the returned error is either DDICTL_E_R_PRFSYNTAXERR, indicating a
syntax error, or DDICTL_E_R_INVALCHARINPROF, indicating an invalid
character, the SyntaxErrorIndex property
will contain the index at which the translation error was detected.
Some RPN profiles like "A B NOT AND" are ambiguous. "A ~ B" and "(A - B)" both convert to that RPN expression. Always use InsertProfileCriteria when loading an entire profile into the editor; otherwise it may generate expressions within expressions causing a syntax error. Always use InsertExpression when inserting a subexpression into a profile; otherwise expression butnots will become global and some stories that should be included in the view will be excluded.
See Also: InsertSource InsertSubject InsertTicker InsertExpression
Back to: Profile Editor Methods