Loading Grammar in GrammarExplorer

Jun 8, 2009 at 10:24 AM

Hello,

when I try to load a new grammar in the GrammarExplorer, the following error occurs

System.InvalidCastException: Das Objekt des Typs "System.String" kann nicht in Typ "Irony.GrammarExplorer.GrammarItem" umgewandelt werden.
   bei Irony.GrammarExplorer.fmGrammarExplorer.miAdd_Click(Object sender, EventArgs e) in C:\Users\xxx\Documents\Visual Studio 2008\Projects\irony-25364\Irony.GrammarExplorer\fmGrammarExplorer.cs:Zeile 200.
   bei System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   bei System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   bei System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   bei System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   bei System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   bei System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ToolStrip.WndProc(Message& m)
   bei System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

As you can see, I'm using the today's source code (rev. 25364) to compile the Irony.dll and the GrammarExplorer. Any hints?

Thanks in advance =)

Coordinator
Jun 8, 2009 at 3:40 PM

Don't know how it happened, but it looks like items in grammar combo had been messed up, maybe loaded settings saved by old versions. Try selecting "Remove All", clear the grammar list, and then load grammars again

Roman

Jun 10, 2009 at 7:47 AM

That helped. Thanks a lot!

Tobi