Define language in code

SyntaxEditor for Windows Forms Forum

Posted 17 years ago by Scotch - Las Vegas, NV
Avatar
I'm trying to create a language definition without using a separate XML file. I started with an instance of "SyntaxLanguage", but apparently you have to do something with it before it can be used. The following code compiles OK, but when I set the syntaxEditor.Document.Text property, I get an "Object does not exist" error from the DLL:

SyntaxLanguage newLanguage = new SyntaxLanguage("MediaScript", false);
syntaxEditor.Language = newLanguage;

Is there a code sample that shows what is needed to do this correctly?

Regards,
Scott

Comments (1)

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Scott,

The documentation has a couple tutorials on it and there are samples in one of the forms in the sample project. I think the code is on the dynamic language creation form.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.