Community
Showing results for 
Search instead for 
Do you mean 
Reply

ContactDetailView?? What am I missing?

New Member
Posts: 2
Country: USA

ContactDetailView?? What am I missing?

Hello all.

 

I am working through the sample code provided in the webinar and slide deck found here: http://community.act.com/t5/Sage-ACT-Developer-s-Forum/Plugin-webinar-deck-and-recording/td-p/66945

 

I am using the code straight out of slides 13-15 to create a plugin that will allow me to add a tab to my contact view. My problem is with the bit of code on slide 14 that reads:

 

private void AddTab(ViewEventArgs e)
{
    if (this.mySampleTab == null)
    {
        IContactView icv = this.actApp.UIContactManager.GetDefaultContactView();
        ContactDetailView cdv = icv as ContactDetailView;
        if (cdv != null)
        {
        ...
 
I can't find any mention of a ContactDetailView class in the SDK and I can't compile until I figure out what's going on with that line. Am I missing something? I see the IContactDetailView interface, but I cannot find any implementation of that class. The sample code doesn't include the headers that would show me what assemblies are being referenced, so that doesn't help me either. Can any one point me in the right direction?
 
I'm pretty light on C# experience and this is my first forray into ACT! development, so I may be missing something obvious.
 
Thanks
New Member
Posts: 2
Country: USA

Re: ContactDetailView?? What am I missing?

A bit of followup...

 

I can get the plugin to compile and work by commenting out the line containing ContactDetailView and the subsequent check for null, but I still don't know where that class is coming from or what that line of code is doing.

Employee
Posts: 1,163
Country: USA

Re: ContactDetailView?? What am I missing?

You'll be glad to know this looks like a very simple issue. There is no ContactDetailView class, there is a field for this but it's not relevant for this sample, ContactDetailView should be IContactDetailView, it looks as though it's just a typo in the slides, but I believe it should have also extracted a sample project, PluginAddTab.

Matthew Wood
Act! SDK Support
Community Moderator
Tuned Listener
Posts: 14
Country: Australia

Re: ContactDetailView?? What am I missing?

when designing the plugin, is it possible to visually design the components rather than write code? or through loading a well designed windows form? how can i load a form if possible?

8.JPG