Community
Showing results for 
Search instead for 
Do you mean 
Reply

Slow loading plug in

New Member
Posts: 9
Country: United Kingdom

Slow loading plug in

My plug in has a button on a custom toolbar for the Contact Details screen, and another custom toolbar with a button on it for the Group Details screen. The Contact Details screen toolbar loads fine, but there is some odd behaviour when the Group Details toolbar loads.

 

Under ACT! Professional 8.0, the button on the Group Details toolbar becomes visible only when right-clicking on the toolbar & selecting  "Customise...". Strange enough. But under ACT! 2009, there is a noticeable delay (5 seconds or so) before the button becomes visible. Sometimes when debugging, I notice that a "Loading..." dialog (similar to a progress dialog) is visible when this happens.

 

Any ideas?

Platinum Elite Contributor
Posts: 14,384
Country: Australia

Re: Slow loading plug in

[ Edited ]

What command are you using to create the button?

Did you re-compile with .Net 2.0 for ACT! 2009?

Message Edited by GLComputing on 11-23-2008 11:28 PM
New Member
Posts: 9
Country: United Kingdom

Re: Slow loading plug in

Mike,

 

Thanks for your reply. Here's a snip of the process I use to add the button:

 

snip>>>

 

// create the icon
MyIcon=new Icon(buttonPath);

// get the parent menu to hold the custom button
ParentMenu=ACTAPP.Explorer.CommandBarCollection["Connected Menus"].ControlCollection[GetParentControlURN(urn)];
           
// create the new menu item
NewMenu=new Act.UI.Core.CommandBarButton(MenuText,tooltip,null,urn,MyIcon,Act.UI.Core.CommandBarControl.ItemDisplayStyle.TextOnly, false);
           
// set the display style
NewMenu.DisplayStyle=Act.UI.Core.CommandBarControl.ItemDisplayStyle.TextOnly;
           
// register the custom command
ACTAPP.RegisterCommand(urn, new Act.UI.CommandHandler(Handler), Act.UI.RegisterType.Shell);
           
// add the button to the parent menu as a subitem.
// an overload here allows the button to be placed anywhere in the parent menu
ParentMenu.AddSubItem(NewMenu);
 

// get the toolbar
tBar=ACTAPP.Explorer.CommandBarCollection[MyToolbar];

// create the Button with MyIcon
Act.UI.Core.CommandBarButton MyButton=new Act.UI.Core.CommandBarButton("", tooltip, null, urn, MyIcon);

// add to the Toolbar

tBar.ControlCollection.Add(MyButton);

 

<<< end snip

 

New Member
Posts: 9
Country: United Kingdom

Re: Slow loading plug in

I forgot to add, the environment settings are:

 

XP Pro SP 3

IDE Version = Microsoft Visual C# .NET   69462-005-8214884-18962

.NET Framework 1.1

 

To fix this problem, should we be compiling with .NET 2?

 

New Member
Posts: 9
Country: United Kingdom

Re: Slow loading plug in

I've tried the .NET 2 solution by installing Visual Studio 2005 & recompiling, but to no avail.

 

Apart from using the updated System.Configuration.ConfigurationManager.AppSettings object, there doesn't appear to be any difference.

 

New Member
Posts: 9
Country: United Kingdom

Re: Slow loading plug in

Is there a way to refresh the toolbar programmatically?
Nickel Super Contributor
Posts: 441
Country: UK

Re: Slow loading plug in

I am having a similar problem, it works fine when the button is added on startup but when you add it in the view loaded event, the first time you add it, it doesn't display until you either move the mouse over where it should be or change the view to something else and back again.

 

Tom

New Member
Posts: 9
Country: United Kingdom

Re: Slow loading plug in

I forgot to mention that my code snip earlier was inside the ViewLoaded event! What gives?

 

Even more important (in a way), is putting the button/menu/toolbar UI creation in the ViewLoaded event breakswhat used to work in ACT v8...

Platinum Elite Contributor
Posts: 14,384
Country: Australia

Re: Slow loading plug in

Tom, have you played at all with the format of the SER files?

 

Wish they were XML

Nickel Super Contributor
Posts: 441
Country: UK

Re: Slow loading plug in

No but I shouldn't have to, its just not practical to do that for the end users, I think I just need a way to refresh/repaint the toolbar once the button has been added but not sure how...

 

Tom