paragui-users
[Top][All Lists]
Advanced

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

Re: [paragui-users] exception in widget array destruction


From: Alexander Pipelka
Subject: Re: [paragui-users] exception in widget array destruction
Date: Fri, 14 Mar 2003 08:54:38 +0100
User-agent: KMail/1.5

Hi !

I just tested this. No problems so far. I added the "array" sample to the 
"test" dir in the CVS repository.

There must be something specific you're doing that causes the bug. It's also 
possible that the bug has already been fixed in CVS. 

Please recheck.

Alex

Am Donnerstag, 13. März 2003 10:40 schrieb taurus:
> Hello,
>
> I've got strange problem with following.
>
> I've created a new class from PG_ThemeWidget to use it as a panel with
> 10 PG_Label. The idea is to add text to PG_Label widgets by timer,
> some kind of karaoke.
>
> I init PG_Label objects in the constructor like this:
>
>         //In the class definition
>         PG_Label *lines[NUMBEROFTIMINGLINES];
>
>         //In the class constructor
>         for (int i = 0; i < NUMBEROFTIMINGLINES; i++)
>         {
>                 lines[i] = new PG_Label(this, PG_Rect(sX, sY, W, H), "");
>                 lines[i]->SetFontColor(120,30,40);
>                 lines[i]->SetFontStyle(PG_FSTYLE_BOLD);
>                 sY +=H;
>         }
>
> I don't destroy lines[] objects in the class destructor, because, as I
> noticed, ParaGUI will destroy them when class instance will be
> destroyed.
>
> The instance of my new class I create in the heap, not in the local
> scope.
>
> It works fine, the class does everything correct except destruction.
> When class object is destroyed, application generates exception in
> pgmessageobject.cpp in function PG_MessageObject::PumpIntoEventQueue()
> on these lines:
>
> =============================================
> // send to all receivers
>         bool processed = false;
>         std::vector<PG_MessageObject*>::iterator list = objectList.begin();
>         while(list != objectList.end()) {
>                 if((*list)->ProcessEvent(event)) {
>                         processed = true;
>                         break;          // exit loop if an object responds
>                 }
>                 list++;
>         }
> =============================================
>
> It calls (*list) that was already destroyed.
>
> If I comment out lines[] initialization and using, my class is
> destroyed without any exception.
>
> I suspect two things:
> 1) I do something wrong, then how can I create 10 lines of text in my
> panel? It's better not to use widgetlist or richedit due to speed
> issue.
> 2) There is a bug in ParaGUI...
>
> Please, I need help as soon as possible, it stops all my work and I
> already have spent almost 1 month with it...
>
> Thank you!
>
>
> Kind regards,
>        taurus
>
> address@hidden
>
>  ->> "If you will have a megaphone, you will never have to be alone..."
>
>
>
>
> _______________________________________________
> paragui-users mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/paragui-users





reply via email to

[Prev in Thread] Current Thread [Next in Thread]