Messaging Setup


Author
Message
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
When a user clicks my delete button on the toolstrip, the code rips away the record and refreshes the listview.  All is well.

Then, I thought, what if the user picks the wrong item (not that users do that, of course)?  I should pop up a message window asking them if that is really what they want to do...typical delete confirmation stuff.  Here is where I thought would be a great place to implement SF messaging.  So, I went about reading the docs, setting up a project and creating my first message.  It was all very easy and straightforward.  The XML would be placed into the root of my comp and I told the application via the Solution Preferences to use the new localization project.  I called the key from the code that deletes my item, like this:

MessageFunctionType mt = MessageForm.ShowMessageByKey("DeleteConfirmation", mSalesOrderDetails.itemnum);
if (mt == MessageFunctionType.Yes)
{
    ...my delete code stuff

}

F5.

Crash!

The specified key [DeleteConfirmation] was not found within the messaging database.
The file [Message_Languages.xml] could not be found.  The localization languages table could not be loaded.

So, back to the drawing board.

I re-read the docs and ran into the concept of using embedded XML files.  So I walked through that simple procedure as outlined in the docs and hit F5, again.

Same error.

I re-re-read the docs and saw that I maybe missed a step...setting the locale ID.  I went through this and got confused, so I doubt that this is setup correctly, because I am getting the same error.  Here is the stuff from the InitApplication method that is pertinent:

MicroFour.StrataFrame.UI.Localization.MessageKeyType = MicroFour.StrataFrame.Messaging.MessageKeyDataType.XML;
MicroFour.StrataFrame.UI.
Localization.MessageLocaleID = MicroFour.StrataFrame.UI.Localization.GetActiveLanguage();

I left the GetActiveLanguage method with no parameters since the default is fine. 

What did I forget to do?  How do I get the messaging setup correctly to utilize these embedded XML files?

Thanks,
Bill


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search