Re: Can I make a IM Module resident?

2003-04-01 Thread Owen Taylor
On Tue, 2003-04-01 at 00:55, James Su wrote: Hi, Sorry to bother you again. Does it mean, if I create an instance of this type within my immodule, then my module will never be unloaded? Because im_module_exit will never be called if there is an instance living, but the instance must be

Re: Can I make a IM Module resident?

2003-03-31 Thread Owen Taylor
On Sun, 2003-03-30 at 21:32, James Su wrote: Hi, I tried to use g_type_module_register_type () to register my class. This time, the application is never crashed, but the IM module is never unloaded. What's the matter with it? As long as there is an instance of a type, the module

Re: Can I make a IM Module resident?

2003-03-31 Thread James Su
Hi, Sorry to bother you again. Does it mean, if I create an instance of this type within my immodule, then my module will never be unloaded? Because im_module_exit will never be called if there is an instance living, but the instance must be destroyed within im_module_exit. Looks like a black

Re: Can I make a IM Module resident?

2003-03-30 Thread James Su
Hi, I tried to use g_type_module_register_type () to register my class. This time, the application is never crashed, but the IM module is never unloaded. What's the matter with it? Regards James Su Owen Taylor wrote: On Fri, 2003-03-28 at 03:31, James Su wrote: Oh, I see. But the interface

Re: Can I make a IM Module resident?

2003-03-28 Thread James Su
Oh, I see. But the interface of this function is different with the static one, could you please give me some hint on how to use it? The GTypeInfo parameter is replaced by a GTypePlugin pointer. Could you please tell me how can I convert a GTypeInfo into GTypePlugin? Regards James Su Sven

Re: Can I make a IM Module resident?

2003-03-28 Thread Sven Neumann
Hi, James Su [EMAIL PROTECTED] writes: Oh, I see. But the interface of this function is different with the static one, could you please give me some hint on how to use it? The GTypeInfo parameter is replaced by a GTypePlugin pointer. Could you please tell me how can I convert a GTypeInfo

Re: Can I make a IM Module resident?

2003-03-28 Thread Owen Taylor
On Fri, 2003-03-28 at 03:31, James Su wrote: Oh, I see. But the interface of this function is different with the static one, could you please give me some hint on how to use it? The GTypeInfo parameter is replaced by a GTypePlugin pointer. Could you please tell me how can I convert a

Re: Can I make a IM Module resident?

2003-03-28 Thread James Su
Hi, The class I registered is not the im module class, it's another class defined by myself. The im class is registered by g_type_module_register_type(). Regards James Su Sven Neumann wrote: Hi, James Su [EMAIL PROTECTED] writes: Recently, I'm developing a IM Module for gtk+-2.x, but I

Re: Can I make a IM Module resident?

2003-03-27 Thread Sven Neumann
Hi, James Su [EMAIL PROTECTED] writes: Recently, I'm developing a IM Module for gtk+-2.x, but I met a problem. Because I registered a new class within my IM Module by g_type_register_static, then when I open a input context the second time, the application crashed. The error message shows

Re: Can I make a IM Module resident?

2003-03-27 Thread James Su
Hi, The class I registered is not the im module class, it's another class defined by myself. The im class is registered by g_type_module_register_type(). Regards James Su Sven Neumann wrote: Hi, James Su [EMAIL PROTECTED] writes: Recently, I'm developing a IM Module for gtk+-2.x, but I met a

Re: Can I make a IM Module resident?

2003-03-27 Thread James Durie
On Thu, 2003-03-27 at 12:32, James Su wrote: Hi, The class I registered is not the im module class, it's another class defined by myself. The im class is registered by g_type_module_register_type(). Regards James Su Couldn't you do a g_type_from_name first for your static type and only

Re: Can I make a IM Module resident?

2003-03-27 Thread Sven Neumann
Hi, James Su [EMAIL PROTECTED] writes: The class I registered is not the im module class, it's another class defined by myself. The im class is registered by g_type_module_register_type(). uh, oh, how is that supposed to work? A dynamic module can not register a static type. What if the

Re: Can I make a IM Module resident?

2003-03-27 Thread James Su
Yes, I had tried it. But the application is crashed when the IM Module is loaded the third time. Regards James Su James Durie wrote: On Thu, 2003-03-27 at 12:32, James Su wrote: Hi, The class I registered is not the im module class, it's another class defined by myself. The im class is

Re: Can I make a IM Module resident?

2003-03-27 Thread James Su
Then, how can I use my own class within a IM module? There is no type register function like g_type_register_dynamic. Regards James Su Sven Neumann wrote: Hi, James Su [EMAIL PROTECTED] writes: The class I registered is not the im module class, it's another class defined by myself. The im

Re: Can I make a IM Module resident?

2003-03-27 Thread Sven Neumann
Hi, James Su [EMAIL PROTECTED] writes: Then, how can I use my own class within a IM module? There is no type register function like g_type_register_dynamic. I'm pretty sure there is exactly this function. But don't take my word that this is the right way to do this, I'm more or less only

Can I make a IM Module resident?

2003-03-26 Thread James Su
Hi, Recently, I'm developing a IM Module for gtk+-2.x, but I met a problem. Because I registered a new class within my IM Module by g_type_register_static, then when I open a input context the second time, the application crashed. The error message shows can not register a type which already