09-21-2011 01:55 PM - edited 09-21-2011 02:45 PM
Hi:
I have the following code in my Plugin:
Sub Button1Click(sender As Object, e As EventArgs)
Try
Dim cFields As Act.Framework.Contacts.ContactFieldDescriptor() = Me.HostApplication.ActFramework.Contacts.GetContactFieldDescriptors()
textBox1.Text = "It works!"
Catch ex As Exception
textBox1.Text = ex.Message
End Try
End Sub
This code works fine in a UserControl inside my Plugin, but I get an error message when I run it in a Form in my Plugin:
"Object reference not set to an instance of an object."
Any idea why it will run in a UserControl and not in a Form?
09-22-2011 06:41 AM
Did you pass in the ActApplication object from your plugin into your form? My guess is that your HostApplication == null.
09-22-2011 06:41 AM
Did you pass in the ActApplication object from your plugin into your form? My guess is that your HostApplication == null.
10-26-2011 02:21 PM
Matt:
A long time in replying, but I have the same issue popping up.
How do I transfer the ActApplication object to the form?
Thanks!
10-26-2011 02:36 PM
Through sheer dumb luck (and more than a few attempt) I have it figured out.
Thanks again for your help.