Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

/Util/Locale/FormatMBS function web
Function:
You find this example project in your Plugins Download as a Xojo (Real Studio) project file within the examples folder: /Util/Locale/FormatMBS function web
This example is the version from Fri, 25th Jun 2015.
Notes: Last modified: Fri, 25th Jun 2015
Project "FormatMBS function web.rbp"
Class App Inherits WebApplication
End Class
Class Session Inherits WebSession
Const ErrorDialogCancel = "Do Not Send"
Const ErrorDialogMessage = "This application has encountered an error and cannot continue."
Const ErrorDialogQuestion = "Please describe what you were doing right before the error occurred:"
Const ErrorDialogSubmit = "Send"
Const ErrorThankYou = "Thank You"
Const ErrorThankYouMessage = "Your feedback helps us make improvements."
Const NoJavascriptInstructions = "To turn Javascript on, please refer to your browser settings window."
Const NoJavascriptMessage = "Javascript must be enabled to access this page."
End Class
Class WebPage1 Inherits WebPage
Control List Inherits WebListBox
ControlInstance List Inherits WebListBox
End Control
EventHandler Sub Open() // test normal mode test "%f", 1.234 // default locale test "%f", 1.234, "de_DE" // German test "%f", 1.234, "en_US" // US English test "%f", 1.234, "fr_FR" // French test "%f", 1.0 // default locale test "%f", 1.0, "de_DE" // German test "%f", 1.0, "en_US" // US English test "%f", 1.0, "fr_FR" // French // one before comma, 2 after comma test "%1.2f", 1.234 // default locale test "%1.2f", 1.234, "de_DE" // German test "%1.2f", 1.234, "en_US" // US English test "%1.2f", 1.234, "fr_FR" // French // test exceptions test "%f%f", 1.23, "fr_FR" // French test "%f", 1.23, "xxx" // French End EventHandler
Sub Test(format as string, value as Double, locale as string = "") #pragma BreakOnExceptions false List.AddRow format try List.Cell(List.LastIndex,1) = formatMBS(format, value, locale) catch u as UnsupportedFormatException List.Cell(List.LastIndex,2) = u.message end try End Sub
End Class
End Project

See also:

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Util Plugin.




Links
MBS Xojo PDF Plugins