komorra / NodeEditorWinforms

Node based user control / editor for Windows Forms
MIT License
507 stars 142 forks source link

Error when "out string" is used #2

Closed TurkerTunali closed 7 years ago

TurkerTunali commented 7 years ago

Hello,

If we use string parameter as output we get error on control. pasted image at 2016_12_28 09_50 am

What can we do about it?

Code Example: [Node("XML Data", "Input", "Basic", "Allows to output a XML value.",false)] public void InputXml(string inValue, out string outValue) { outValue = inValue; string strOut = ""; //MessageBox("strOut"); }

komorra commented 7 years ago

Hello,

Please enable C# Exception Handling (full check on "Common Language Runtime Exceptions"), and try to break on the moment that exception occurs. Please provide here more detail on exception and inner exception as well then.

TurkerTunali commented 7 years ago

We have added this line to resolve issue before your comment. Next time we will try to give exception as well.

var p = output.ParameterType == typeof(string) ? "" : output.ParameterType.FullName.Replace("&", "").Replace(" ", "") == "System.String" ? "" : Activator.CreateInstance(AppDomain.CurrentDomain, output.ParameterType.Assembly.GetName().Name, output.ParameterType.FullName.Replace("&", "").Replace(" ", "")).Unwrap();