FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Test2003 uses all CPU
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Test2003 uses all CPU
Posted: Fri Jan 11, 2008 07:02 PM

When I run the Test2003.exe it uses 98% of the CPU time. There must be a continuious loop somewhere. Has anyone else noticed this?

FWH 8.01/xHarbour

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Test2003 uses all CPU
Posted: Fri Jan 11, 2008 07:10 PM

I forgot to mention that TEST2003.PRG is in the samples folder. It is a test of the Outlook 2003 style control.

I found the CPU problem. If you comment out the WinRun() function the CPU usage drops to zero. That function appears to have been used to trap GPF's and it is a continous loop.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Test2003 uses all CPU
Posted: Fri Jan 11, 2008 07:41 PM

James,

Yes, that sample is more a sort of workaround instead of a proper implementation, as there is a GPF that comes from the MDI internal procedure and we can just trap it and ignore it.

Maybe we could use Sleep(), or some similar function

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Test2003 uses all CPU
Posted: Tue Feb 05, 2008 03:53 PM

Is the 2003 class ready for use?
Are there somewhere more examples to show how to use the right site of the window?
Regards,
Otto

Posts: 95
Joined: Fri Nov 23, 2007 04:43 AM
Test2003 uses all CPU
Posted: Tue Feb 05, 2008 08:34 PM
Otto wrote:Is the 2003 class ready for use?
Are there somewhere more examples to show how to use the right site of the window?
Regards,
Otto


I'm using it for a month. I like this kind of navigation of my application.
For me it's ready to use.
Robert Frank
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Test2003 uses all CPU
Posted: Tue Feb 05, 2008 08:46 PM

Otto,

The class is usable, but it could be improved.

I just discovered today that you cannot use resource dialogs with an oulook bar on the main window. Each dialog must be written as code. This is quite tedious.

I am looking at a solution for this.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Test2003 uses all CPU
Posted: Tue Feb 05, 2008 09:53 PM

James,

We will enhance it to support them,

Thanks for your feedback,

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Test2003 uses all CPU
Posted: Wed Feb 06, 2008 01:48 AM

Antonio,

It would be great if we could do this:

Define outlook2003 oOutlook of oWnd:
Prompts "Customer","Inventory";
Dialogs "Customer","Inventory"

I know it is a little unusual since we would be defining a outlook bar from code and dialogs from resources in the same statement.

I tried defining a dialog from a resource then doing:

oOutlook:aDialogs[1]:= oDlg

I could get it to display but all the controls are unclickable and the outlook bar buttons vanish. I'm still looking into it.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Test2003 uses all CPU
Posted: Wed Feb 06, 2008 03:11 PM

Antonio,

I have made the necessary changes to the Outlook2003 class so we can use resource dialogs with a defined Outlook bar on the main window. I will be forwarding them as soon as I get them cleaned up and fully tested.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Test2003 uses all CPU
Posted: Wed Feb 06, 2008 03:23 PM

Antonio,

I notice that in the Outlook2003 class you are defining a local oFont in the Redefine() method. There are also two other fonts oFontHeader and oFontGroup which are class vars and do get destroyed.

Doesn't this mean that the local oFont is not getting destroyed and thus becomes a memory leak?

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Test2003 uses all CPU
Posted: Wed Feb 06, 2008 09:26 PM

James,

>
I have made the necessary changes to the Outlook2003 class so we can use resource dialogs with a defined Outlook bar on the main window. I will be forwarding them as soon as I get them cleaned up and fully tested.
>

Thanks! :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion