IceChat Forums

IceChat 9 => IceChat 9 Coding => Topic started by: KommerszUnicum on August 04, 2012, 05:10:19 PM

Title: Plugin initialization issue
Post by: KommerszUnicum on August 04, 2012, 05:10:19 PM
Hi Snerf!

I played a bit with the IceChat plugins and I've found a minor issue in the loading logic.

As it can be seen on the SVN log, the plugins are now being loaded on a separate thread. And the plugin initialization takes place at the MainForm constructor.

Code: [Select]
System.Threading.Thread initPlugin = new System.Threading.Thread(new System.Threading.ParameterizedThreadStart(InitializePlugin));
But because in the loadPlugin function the initialization is commented out, when someone loads a plugin at runtime and would like to immediately try it, a plugin which main functionality are loaded with the Initialize() function rather than its default constructor will crash.

Code: [Select]
//ipi.Initialize();
Only the automatically loaded plugins at icechat statup (from IceChat9\Plugins\) can be used without problem. The "Load a plugin..." has lost the initialization when try to load a file which location differs from IceChat9\Plugins\ direcory.

KU
Title: Re: Plugin initialization issue
Post by: Snerf on August 08, 2012, 03:36:52 PM
Ah yes, I see, I changed on but not the other.
Will fix it for RC 4.1.