![Avatar](https://secure.gravatar.com/avatar/db300533da572600d02551571f61737e.jpg?s=64&d=identicon&r=g)
Hi,
I have a list of some views, each containing a syntaxeditor.
When switching between the views of the list, the editor is initialised with a new language and text and some new lexical patterns to verify.
Now we get an exception - not binded to a special item, just when switching to ione or another:
NullReferenceException
Object reference not set to an instance of an object.
at ActiproSoftware.Text.Lexing.Implementation.DynamicLexicalState.#EJ(ITextBufferReader reader)
at ActiproSoftware.Text.Lexing.Implementation.DynamicLexer.GetNextToken(ITextBufferReader reader, ILexicalState lexicalState)
at ActiproSoftware.Text.Lexing.Implementation.MergableLexerCoordinator.GetNextToken()
at ActiproSoftware.Text.Parsing.LLParser.Implementation.MergableTokenReader.GetNextToken()
at Gradient.WPF.Actipro.Controls.SyntaxEditor.MengenEditor.MengeTokenReader.GetNextToken()
protected override IToken GetNextToken()
{
// Call the base method
IToken token = base.GetNextToken();
// Loop to skip over tokens that are insignificant to the parser
while (!this.IsAtEnd)
{
switch (token.Id)
{
case MengeTokenId.Whitespace:
// Skip
token = base.GetNextToken();
break;
default:
return token;
}
}
return token;
}
and the step before that could be
either
at ActiproSoftware.Text.Parsing.LLParser.Implementation.TokenReaderBase.GetLookAheadToken(Int32 count)
or
at ActiproSoftware.Text.Parsing.LLParser.Implementation.TokenReaderBase.Advance()
Have you any idea, which object in the ActiproSoftware.Text.Lexing.Implementation.DynamicLexicalState.#EJ(ITextBufferReader reader) could be null?
Thanks!