Detecting lexical state change to a child language

SyntaxEditor for Windows Forms Forum

Posted 19 years ago by Marianne
Avatar
What is the best way to accomplish this? Looking at the sample app, selection_changed is used to get the token.lexicalstate.key value. I'm not interested in getting the information every time the selection changes. Rather, I just want to know when the lexical state has changed from a child language to a parent language and vice-versa.

Are there any existing events that will let me capture this? Or do I need to save the value to a variable and then compare the value for each selection change? Thanks.

------------------------------- Marianne

Comments (1)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes the best way to do it is save the state in a variable and compare it between calls. Also you might want to make use of the new state ID values in 3.0 if you have that version since numeric compares will be faster than string (Key) based compares.


Actipro Software Support

The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.