Events in 2010 Version

Add-in Express™ Support Service
That's what is more important than anything else

Events in 2010 Version
 
Martin Huber




Posts: 1
Joined: 2010-01-19
I have a problem figuring out when the events of my toolbar are called in 2010 version...

for example:
OnConnect is only called when I freshly add the toolbar.
OnDisconnect is called everytime i close a tab in IE.
in the 2009 Version OnConnect was called with every new tab i opened in IE.

So concluding in 2010 Version:
OnConnect is called when I add the toolbar freshly.
OnBeforeShow is called with every tab I open.
OnBeforeHide is called with every tab I close followed by OnDisconnect.

The other thing is OnSendMessage is not called when I do a SendMessageToAll.
Works in 2009 version.

Thanks,
Posted 19 Jan, 2010 03:50:23 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Hi Martin.

Thank you for the bug report. Please use the workaround below.
You need to implement the IRemoteModule interface in the toolbar class:
......
public class MyIEToolBar1 : AddinExpress.IE.ADXIEToolbar, AddinExpress.IE.IRemoteModule
.......

#region IRemoteModule Members

public void DoError(object sender, Exception e)
{
}

public AddinExpress.IE.ADXIEContextMenuCommandCollection GetContextMenu()
{
return null;
}

public object GetIEApplication()
{
return null;
}

public int GetIEVersion()
{
return 0;
}

public IntPtr GetMainWindowHandle()
{
return IntPtr.Zero;
}

public object GetMenuHelper()
{
return null;
}

public IntPtr GetNativeWindowHandle()
{
return IntPtr.Zero;
}

public IntPtr GetParentHandle()
{
return IntPtr.Zero;
}

public ISite GetSite()
{
return null;
}

public bool Is32BitsProcess
{
get
{
return true;
}
}

public bool IsActive
{
get
{
return false;
}
}

public bool IsThemed
{
get
{
return true;
}
}

public int ListOrder
{
get
{
return 0;
}
}

public string ReadStatusText()
{
return "";
}

public void RegisterModule(object module, int index)
{
}

public void SetStatusText(string text)
{
}

public void UnregisterModule(int index)
{
}

#endregion

I will fix it in the next build. Please read the whatsnew.txt file to learn if the bug is fixed.
Posted 19 Jan, 2010 09:03:40 Top