Posted 18 years ago
by Karl Grambow
![Avatar](https://secure.gravatar.com/avatar/70ef38deabf33bc332755631639ed30f.jpg?s=64&d=identicon&r=g)
Hi,
I'm using SyntaxEditor v3.1.210 with .net 1.1 on Win XP.
I'm attempting to find out whether a particular string exists as a pattern in a given pattern group. This is the code I'm using.Now, where I try to get patternGroups("ReservedWord") it returns nothing but if I enter the index id for the patterngroup it returns the pattern group as expected, which ,if I look at, has a token key of "SystemTables".
I've tried the same with the beta of v4.0 and the same thing happens so perhaps I'm doing something wrong.
Is this a bug or is there another way I should be doing this?
Thanks,
Karl
I'm using SyntaxEditor v3.1.210 with .net 1.1 on Win XP.
I'm attempting to find out whether a particular string exists as a pattern in a given pattern group. This is the code I'm using.
Dim doc As New ActiproSoftware.SyntaxEditor.Document
doc.LoadLanguageFromXml('language file in here)
Dim language As SyntaxLanguage = doc.Language
Dim state As LexicalState = language.DefaultLexicalState
Dim patternGroups As LexicalPatternGroupCollection = state.LexicalPatternGroups
Dim SystemTables As LexicalPatternGroup = patternGroups("SystemTables")'this returns nothing
For Each table As LexicalPattern In SystemTables
If table.Pattern = tablename Then Return True 'found the item
Next
I've tried the same with the beta of v4.0 and the same thing happens so perhaps I'm doing something wrong.
Is this a bug or is there another way I should be doing this?
Thanks,
Karl