Re: How to emit signals in Glib::Object derived modules?



Samuel Abels said:
Hello,

On Thu, 2004-09-02 at 14:29, Ross McFarland wrote:
On Thu, 2004-09-02 at 07:16, Sam wrote:
Hello,

use Glib::Object::Subclass
    TestClass::,


if you want to make an object, that isn't a widget, then you want to
inherit from Glib::Object, the base object of the hierarchy. you have to
inherit from something.

Thanks, this works just fine... but only as long as it happens at
compile-time. Unfortunately I am trying to implement this for a Perl
program that loads the module as a plugin only under certain conditions,
so it happens at runtime. So in this case, it produces this error
message:

Too late to run ??? block
        (W void) A CHECK or INIT block is being defined during run time
        proper, when the opportunity to run them has already passed.
        Perhaps you are loading a file with "require" or "do" when you
        should be using "use" instead. Or perhaps you should put the
        "require" or "do" inside a BEGIN block.

Any chance to make this work at runtime? Ugh, just saw that it is
possible to define the block type somehow. I'll give it a shot when I
get back to work tomorrow. ;)

what version of Glib/Gtk2 do you have?

are you using require to load this module?

-rm



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