This is a migrated thread and some comments may be shown as answers.

RadMarkupEditor NullReferenceException after pasting HTML code

3 Answers 85 Views
TextBox
This is a migrated thread and some comments may be shown as answers.
Martin Horst
Top achievements
Rank 1
Martin Horst asked on 09 Aug 2010, 02:36 PM

Hi,

I tried out the the RadMarkupDialog. When I paste HTML code (e.g. copied from Visual Studio source code editor) I get the following exception:

System.Reflection.TargetInvocationException: NullReferenceException... 

bei Telerik.WinControls.UI.RadMarkupEditor.fontSizeCombo_SelectedIndexChanged(Object sender, EventArgs e)
bei Telerik.WinControls.UI.RadComboBoxElement.OnSelectedIndexChanged(EventArgs e)
bei Telerik.WinControls.UI.ComboPopupForm.listBoxElement_SelectedIndexChanged(Object sender, EventArgs e)
bei Telerik.WinControls.UI.RadListBoxElement.OnSelectedIndexChanged(SelectedIndexChangedEventArgs e)
bei Telerik.WinControls.UI.RadListBoxElement.DispatchSelectionEvents(Boolean selectedIndex, Boolean selectedItem, Object oldValue)
bei Telerik.WinControls.UI.RadListBoxElement.SetSelectedItem(Object value, Boolean fireEventsParam)
bei Telerik.WinControls.UI.RadListBoxElement.set_SelectedItem(Object value)
bei Telerik.WinControls.UI.RadListBoxElement.SetSelectedValue(Object value)
bei Telerik.WinControls.UI.RadMarkupEditor.OnBodyInteraction()
bei Telerik.WinControls.UI.RadMarkupEditor.OnBodyInteraction(Object sender, HtmlElementEventArgs e)
bei System.Windows.Forms.HtmlElementEventHandler.Invoke(Object sender, HtmlElementEventArgs e)
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
bei System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
bei System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
bei System.Delegate.DynamicInvokeImpl(Object[] args)
bei System.Windows.Forms.HtmlShim.FireEvent(Object key, EventArgs e)

It seams that if the font size combobox doesn't have the pasted font size, no element is selected and this results in the exception. 

Regards

Martin

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 10 Aug 2010, 04:45 PM
Hi Martin Horst,

Thanks for contacting us.

I have tried to reproduce the case with RadMarkup dialog, but I was not able to achieve any undesired behavior. Could you please share some further details on the case - I would like to ask you which version of our product you are using?

I look forward to receiving further details on the case.


All the best,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Martin Horst
Top achievements
Rank 1
answered on 11 Aug 2010, 06:53 AM

Hi,

I used an older version but I checked it out with the latest version 2010.2 10.806. I'm sorry to say I got the same result. I figured out that pasting HTML code works fine, also does plain text. But pasting richtext results in an exception. Try to copy some bold text from the WordPad and paste it into the markup editor. After that set the cursor above the pasted text, the exception should occur immediately.

Best regards

Martin

0
Peter
Telerik team
answered on 16 Aug 2010, 04:02 PM
Hello Martin Horst,

Thank you for writing.

We found what causes your issue and we will address it in our next internal build scheduled for this Friday. Thank you for bringing this issue to our attention. I have updated your telerik points.

Thank you for the time taken to help us investigate the case. Let me know if you have further questions.

Greetings,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TextBox
Asked by
Martin Horst
Top achievements
Rank 1
Answers by
Peter
Telerik team
Martin Horst
Top achievements
Rank 1
Share this question
or