StrataFrame Forum

Error when adding new language in Localization and Messaging Editor

http://forum.strataframe.net/Topic21644.aspx

By Edhy Rijo - 1/23/2009

Hi Trent,

When adding a new language and canceling the childform from the "Open a Messaging Project" form, will throw this Exception and will not let you add another language:

Exception
  There is no snapshot for the specified key.  The SaveCurrentDataTableToSnapshot must be called before the restore.

Source     : MicroFour StrataFrame Business

Stack Trace:
   at MicroFour.StrataFrame.Business.BusinessLayer.RestoreCurrentDataTableSnapshot(String key, Boolean refreshUI)
   at MicroFour.StrataFrame.Business.BusinessLayer.RestoreCurrentDataTableSnapshot(Boolean refreshUI)
   at SFMessaging.ProjectSettingsControl.lstLanguages_ChildFormResults(Object sender, ListViewChildFormResultsEventArgs e)
   at MicroFour.StrataFrame.UI.Windows.Forms.ListView.OnChildFormResults(ListViewChildFormResultsEventArgs e)
   at MicroFour.StrataFrame.UI.Windows.Forms.ListView.AddNewChildRecord()
   at MicroFour.StrataFrame.UI.Windows.Forms.ListView.HandleObjectClick(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)
   at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

By Edhy Rijo - 1/23/2009

Also after closing the Localization and Messaging (LM) Editor, I open LM again with my project and there I was able to add new languages, but when modifing any of the languages, after saving, the Save button was disable and was not able to select any other node like "Messages or Text Values", and the following exception showed up:

BusinessLayerException
  The CurrentRow for table '[dbo].[MessageItems]' could not be evaluated because the CurrentRowIndex is out of range.  Business object record count: 0.  CurrentRowIndex: -1.

Source     : MicroFour StrataFrame Business

Stack Trace:
   at MicroFour.StrataFrame.Business.BusinessLayer.get_CurrentRow()
   at SFMessaging.MessageEditor.SaveChanges()
   at SFMessaging.MessageEditor.Item_Save_Click(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)
   at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

P.S.

I am using the version 1.6.7 beta

By Trent L. Taylor - 1/25/2009

This has already been fixed, but to add a new language, you no longer will need to do it from there.  Open up the localization project, and there is now an option at the top of the tree view (very 1st item) which is the project options.  You will add the languages here and this will not produce this error.
By Edhy Rijo - 1/25/2009

Thanks, I found that option before.
By Trent L. Taylor - 1/25/2009

Cool Cool
By lastcanary - 3/21/2010

Dear Sir,



I couldnt be able to add multiple languages to a messaging project. When I click on add button on the languages part for adding a new messaging project it is just editing the current language but it is not adding a new language.



I thought that it can be from regional settings. I am currently using my regional settings as "Turkish", I changed it to "English" but it didnt work.



Could you please help?



Best Regards
By Dustin Taylor - 3/23/2010

Hello,

See the attached screenshot to see where to add a language as Trent described ealier. You will:

1) Click on Project Settings

2) Click "Add" under the Languages section

3) Select your language from the "Language Properties" box.

Is that the process you are going through to add a language? If so, are you on the latest build of StrataFrame? (I tried in on my end and it worked without issue.)

Thanks!

By lastcanary - 3/23/2010

It is now working. I thought that it will add new languages in New Project dialog but I now learned that it can add languages after open project option is selected. Thanks for the answer.



Best Regards
By Dustin Taylor - 3/26/2010

Glad you got it going!