Community
Showing results for 
Search instead for 
Do you mean 
Reply

ACT! 2011 SDK - Code Samples help

New Member
Posts: 8
Country: USA

ACT! 2011 SDK - Code Samples help

Hi, I'm just getting started with the SDK and managed to compile the custom control - put all the references in and get it working in ACT no problem.

 

I'm using visual studio 2010 .net 3.5

 

However I can't get the custommenuplugin to work. I put all the references in that it asks for plus some extra ones that I need to put in to compile it from 'C:\ACT_Premium_2011\ACTWG\GlobalAssemblyCache' including:

 

ACT.Framework

ACT.UI

ACT.UI.Core

System.Windows.Forms

System.Drawing

 

Can someone confirm that I am right in referencing all of the above?

 

I then copy the dll to the plugins file and it doesnt load in ACT or appear in DependentDLLs.xml

 

I'm only just getting started with this and would just like to see both the plugins working before I carry on. Any help would be much appreciated.

Employee
Posts: 1,163
Country: USA

Re: ACT! 2011 SDK - Code Samples help

Yes, all of those reference would be needed for developing a plug-in, If you were missing any references or dependencies you should get errors when you attempt to compile the solution.

 

Whenever Act launches it checks the plug-in folder to determine if any new plug-ins that aren't listed in DependantDlls.xml are present, and if there are, it should attempt to load them, it'd be very odd for it to not attempt to load the plug-in and not list it in DependantDlls.xml.

 

Is it failing to add the menu item? Are there any errors being reported in the LogViewer (this can be found in the //Program Files/Act/Act for Windows folder)? Also, you can setup your post build events to drop the assembly in the plug-in folder and then set it to launch Act when debugging, you could then set a break point at the On_Load event and see if it's ever getting there.

Matthew Wood
Act! SDK Support
Community Moderator
New Member
Posts: 8
Country: USA

Re: ACT! 2011 SDK - Code Samples help

When I check the log viewer, there is an error showing which only appears when I add the dll to the plugins folder:

 

Error Exception: An attempt was made to access the framework without having logged on to a database. Please log on to a database first.Act.Framework.NotLoggedOnException: An attempt was made to access the framework without having logged on to a database. Please log on to a database first.

 

Obviously it's trying to access the framework but can't due to access to a database.

 

I'll be honest, I havent really read through the SDK properly to completely understand how this works, however I was hoping just to see these samples working before I start investing more time into learning the SDK.

 

Do you know of the cause for this particular error?

Employee
Posts: 1,163
Country: USA

Re: ACT! 2011 SDK - Code Samples help

I recompled the sample and didn't have any issues, so the code should be fine.

 

What version of Act is installed? What version of the references? Are there any other plug-ins installed?

Matthew Wood
Act! SDK Support
Community Moderator
New Member
Posts: 8
Country: USA

Re: ACT! 2011 SDK - Code Samples help

Actually sorted it by deleting dependentdlls.

 

Perhaps I should have read the FAQ first, lol.

 

Cheers for the help anyway, learning how to extend these further now.