Co-Creating a SimpleTextParser

1306
0
10-14-2011 12:27 PM
MeToo
by
New Contributor
What's wrong with this code... or is it an ArcGIS bug?

  Dim Text As String = "<BOL>My bold text</BOL>"
  Dim aTextParser As ESRI.ArcGIS.Display.ITextParser

  'The next line creates an unhandled COMException error. Why? SimpleTextParser is supposed to be a co-creatable class!
  aTextParser = New ESRI.ArcGIS.Display.SimpleTextParser

  aTextParser.Text = Text
  Dim bHasTags As Boolean
  aTextParser.HasTags(bHasTags)
  If bHasTags Then
   MsgBox(Text & " HAS TAGS")
  Else
   MsgBox(Text & " DOESN'T HAVE TAGS")
  End If
0 Kudos
0 Replies