Chinese bug

2 posts, 0 answers
  1. Rob
    Rob avatar
    5 posts
    Member since:
    Feb 2011

    Posted 08 Feb 2011 Link to this post

    I know RadRichTextBox currently does not support writing in Chinese.

    But i need to detect the exception when someone is writing on chinese or other IME input.

    I see in the Telerik examples that you can write on chinese and the control not crash. I need something like it.

    I try to override the

    protected override void OnTextInputUpdate(TextCompositionEventArgs e)
            {
                try
                {
                    base.OnTextInputUpdate(e);
                }
                catch(Exception ex){ }
            }
     
    of the  RadRichTextBox, but the exceptions is throw before this point.

    thank you very much!
    Roberto.
  2. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 10 Feb 2011 Link to this post

    Hello Roberto,

    You can implement the desired behavior in the App.xaml.cs file in your application, in the handler for UnhandledException event. Something like this should do the trick:

    private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
    {
        // If the app is running outside of the debugger then report the exception using
        // the browser's exception mechanism. On IE this will display it a yellow alert
        // icon in the status bar and Firefox will display a script error.
        if (!System.Diagnostics.Debugger.IsAttached)
        {
      
            // NOTE: This will allow the application to continue running after an exception has been thrown
            // but not handled.
            // For production applications this error handling should be replaced with something that will
            // report the error to the website and stop the application.
            if (e.ExceptionObject.Message == "Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))")
            {
                MessageBox.Show("Writing using IME is currently not supported. Please change your input language.");
            }
            e.Handled = true;
           //Do not report to DOM
           // Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
        }
    }

    If you have other questions, do not hesitate to contact us again. We will do our best to resolve this problem at our side in the next version.

    Regards,
    Iva
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Back to Top