Doker Posted September 24, 2005 Posted September 24, 2005 This is a log from my plugin. (New means .ctor invoked - i have one in my plugin) >>> New ------------------- >>> New ------------------- >>> New ------------------- >>> New ------------------- > CreateConfigDialog > InitialInitToken > Manager_Load > InitDialogFromToken > InitTokenFromDialog >Closing >>> New ------------------- > CreateConfigDialog > InitialInitToken > Manager_Load > InitDialogFromToken > InitTokenFromDialog >Applied >Closing >>> New ------------------- >>> New ------------------- >>> New ------------------- > CreateConfigDialog > InitialInitToken > InitDialogFromToken > Manager_Load > InitDialogFromToken > InitTokenFromDialog >Closing Numbers seams to change every time. Quote
Rick Brewster Posted September 24, 2005 Posted September 24, 2005 This isn't a bug. Your effect will be instantiated quite a bit, with at least one copy per thread. It's done this way for reliability reasons. Your Effect instance should be stateless as much as possible, with any configuration or caching done via the EffectConfigToken. The EffectConfigDialog serves strictly to configure the values in the EffectConfigToken, which are then sent along over to instances of the Effect class for rendering purposes. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html
Doker Posted September 24, 2005 Author Posted September 24, 2005 ye, ye and why at start-up. It's not said i will use it only because it's in Effects menu. Quote
Doker Posted September 24, 2005 Author Posted September 24, 2005 And btw. All those tokens and on is for nothing. It makes plugin developing harder and you can live without it just using Static Class (i think) ,and in VB.Net Module (that's for sure) that is a part of code accessible from the moment assembly is loaded till it's unloaded and is also thread safe. I don't say you do it wrong. I just say it can be done easier. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.