[gDesklets] Writing Controls with more than one Interface calls Control constructor more than once

Hello there,

I'm currently writing a control that implements 3 interfaces and thereby I got some very strange errors. After I've followed/debugged every method in my control class, I've found out, that, if my desklet wants to use more than one of these interfaces, by adding for example these two lines in the display-file:

<control id="xmms2playback" interface="IXMMS2Playback:95mw8bxkucszpgdm0px8yy0f9-2" /> <control id="xmms2config" interface="IXMMS2Config:2z6o0k9v8v1ldguyg8vob7pyd-2" />

(both interfaces are from the same control)

the constructor of the Control Class is called twice, or if i add more, than the control constructor is called as many times as interfaces i've loaded. This produces very stranges things, for example, if you start a timer in the Control constructor, this timer is started more than once, which can cause real trouble, as it did in my case. Another problem was, that all access to interface attributes from the display (getting/setting of interface attributes) were executed twice...

So my question is:

Am i doing the wrong way of loading interfaces in the display (is there a possibility to load and bind different interfaces to an id in one control tag?), how can i force gdesklets to call the control constructor only once or is there a special reason for calling the control constructor everytime an interface is used?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]