|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
PropertyGrid and remote objectsI am new to remoting, so I hope my problem is not so big for many of us as it is for me. I have a plugin architecture which consists in many classes derived from a IPlugin interface (defined by me) and Windows.Forms.Form. Plugins are created in a seprate domain and client app gets their instances using assembly.CreateInstace(...) after searching in dlls for types which support IPlugin interface. Every thing works fine! Client app can invoke methods defined in plugin throw its interface. Problems arise when I try to pass plugin instance to PropertyGrid.SelectObject, to show plugin properties. 1. Only properties derived from Form class are shown, while those defined by IPlugin or plugin class are not. Does anyone know the reasons for this? Is there any attribute missing defining properties in my class? 2. To filter properties, searching on ng, I found an interesting solution: I defined a new PluginProp class, derived from a new interface IPluginProp and MarshalByRefObject. This class is constructed by passing a IPlugin reference to its constructor. This class exposes only Plugin properties I really need (i.e. not those related to Form class). I create an instance of IPluginProp correctly, but when I pass it to PropertyGrid nothing happens. No property is displayed. Which is the error? I hope someone could give me some usefull suggestions! Thanks in advance for reading. Ciao, Andrea |
|||||||||||||||||||||||