Using nbInterface - Forum

Forum Navigation
You need to log in to create posts and topics.

Using nbInterface

Using C# not Delphi

I'm working on a plugin that uses the nbEditAction action to change a simple object but I have a problem..

I'm calling the Object Selector dialog to select a rectangle for my new action .  Double click the action param and the built in object selector dialog displays and I can select a rectangle just fine.  But the rectangle value inside the VisualNeoWin action command does not update.  I receive the changed value in the data variable back in C# but in the VisualNeoWin interface the param will not change.

The boolean value in C# after selecting is always false. I'm not sure what the boolean does.  Is it the selection? Because the selection rectangle object is returned to C# just fine in the data variable.  If I pass a value as true, it changes it to false..

Why is it not changing the action param with the selected rectangle name?

Here's what it's doing..

Object Selection Dialog

Hello,

I attach a answer, because the forum security software do no like my text.

Regards

Hans-Peter

 

 

Uploaded files:
  • You need to login to have access to uploads.
Darbdenral has reacted to this post.
Darbdenral

@hpw I see what your saying..

I'm not sure what param-variable I can write to? It's not an active variable in the selection.  I mean, it's not a variable that I could use  nbSetVar  anywhere is it?  You must mean I  need to set the param-variable on the C# side .. I'm not having any luck though..  I will keep trying..

here is part of the code I'm using.

inside case statement
rectangle is cParams[0] 

if (nbInterface != null)
{
  bool reg;
  IntPtr data = Marshal.StringToBSTR("");
  nbInterface(8, data, out reg);
  string rec = Marshal.PtrToStringAnsi(Marshal.ReadIntPtr(data));
  // show edit dialog with input with rectangle name
  string input = rec;
  if (Utils.ShowInputDialog(ref input) == DialogResult.OK)
    {
   // does not work .. need to set param-variable here but?    
   cParams[0] = input;
   return true;
    }

thanks!

@hpw , I think I found where the param-variable was hiding.. An array of Pchar passed to the EditAction function..  I just need to mess with the array conversion from C# to Pchar now..  This may take a while.. ;)

Thanks for steering me in the right direction!

 

Hello,

It is interesting to see a C# plugin. Keep us uptodate.

Regards

Hans-Peter

 

Darbdenral has reacted to this post.
Darbdenral