Token keys are null

SyntaxEditor for WPF Forum

Posted 14 years ago by Kasper
Version: 11.1.0545
Avatar
Hi guys,

I'm not really sure if this is a bug or by design, but it seems that if a character is not a part of the language definition, it will still be read as a token, but its key will be set to null. This can be seen e.g. in the PHP language, where ; (which means the same in PHP as in C#) has not been defined. In the SDI Code Editor you can even see that the key is null by setting the cursor just before a semicolon. Is this by design? In SE for WinForms, the key would be set to Default, which I think makes pretty good sense. My problem obviously is that I have quite a bit of code which doesn't really expects a null reference when the token is defined. Please let me know your thoughts on this :)

Comments (1)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Kasper,

You could probably set a DefaultTokenKey="Default" attribute on the default state to implement it how you want.

If that isn't set and no valid token is matched in a state, then it will default to a null key.


Actipro Software Support

The latest build of this product (v25.1.0) was released 29 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.