Page 1 of 2

skinbuttons problem

PostPosted: Tue Sep 07, 2010 1:14 pm
by Richard Chidiak
Antonio

When activating skinbuttons() , the process keeps growing and growing and the memory blows after a while

Removing skinbuttons() everything goes back to normal

FWH 10.7 windows seven 64 bits (problem occuring on xp and vista also)

Regards

Richard

Re: skinbuttons problem

PostPosted: Wed Sep 08, 2010 8:55 am
by Antonio Linares
Richard,

We are testing this example on Windows 7 32 bits and it seems to work fine:
Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   local oDlg

   SkinButtons()

   DEFINE DIALOG oDlg

   @ 2, 2 BUTTON "OK"

   ACTIVATE DIALOG oDlg CENTERED

   CheckRes()

return nil
 

The generated checkres.txt file is clean. Also, the task manager shows constant values:

Image
Please notice that "USER objects" and "GDI objects" for test.exe remain constant.

Surely we need to find another example where we can isolate the GDI consume that you mention.

Re: skinbuttons problem

PostPosted: Wed Sep 08, 2010 11:15 am
by Richard Chidiak
Antonio

Doing further research in my code also i found

SETSKINS(.T.)

I have commented this line and now it looks much better , maybe the cause of the problem ?

anyway , removing skinbuttons() the application is much faster responding to all controls (dialogs...)

Still searching

Richard

Re: skinbuttons problem

PostPosted: Wed Sep 08, 2010 11:24 am
by Antonio Linares
Richard,

SetSkins() is implemented in source\classes\window.prg and actually it does almost nothing. It just changes the value of a static variable but it is not used from any other place.

The speed difference that you notice is due to the fact that the FWH skins use PRG code and it is not as fast as the C (or assembler) code used by Windows.

Re: skinbuttons problem

PostPosted: Wed Sep 08, 2010 11:33 am
by Richard Chidiak
Antonio

Can you please change your test to enter the dialog more than once and check the gdi objects, you will see them growing

Just enter the dialog and exit more than once and check at exit time

Richard

Re: skinbuttons problem

PostPosted: Wed Sep 08, 2010 11:43 am
by Antonio Linares
Richard,

I have tested it this way and it is working fine. How have you tested it ?
Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   local n
   
   SkinButtons()
   
   for n = 1 to 10
      Test()
   next
   
   CheckRes()
   
return nil      

function Test()

   local oDlg

   DEFINE DIALOG oDlg

   @ 2, 2 BUTTON "OK"

   ACTIVATE DIALOG oDlg CENTERED

return nil
 

Re: skinbuttons problem

PostPosted: Wed Sep 08, 2010 11:48 am
by Richard Chidiak
Antonio

Your test is fine, i did the same

Start the windows task manager and look at the gdi objects everytime you press on the ok button of the dialog

They keep growing

Richard

Re: skinbuttons problem

PostPosted: Wed Sep 08, 2010 1:24 pm
by Antonio Linares
Richard,

Could you please test it using FWH 10.8 ? thanks :-)

Re: skinbuttons problem

PostPosted: Wed Sep 08, 2010 1:27 pm
by Richard Chidiak
i don't have fwh 10.8 for the moment,

I need to download it form my xp machine (fivetech's download does not work from w7 !) , i can only do this tomorrow and report back

Richard

Re: skinbuttons problem

PostPosted: Wed Sep 08, 2010 1:35 pm
by Richard Chidiak
Antonio

from your sample test without changing anything,

did you start the task manager and check the gdi objects when clicking on OK

If gdi objects don't change (or a little) , then the problem is fixed in fwh 10.8 , in my case (10.7) the values get almost doubled ....

I will check it tomorrow though,

Richard

Re: skinbuttons problem

PostPosted: Wed Sep 08, 2010 5:01 pm
by Enrico Maria Giordano
Another problem is illustrated by the following sample:

Code: Select all  Expand view
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg, oBtn

    SKINBUTTONS()

    DEFINE DIALOG oDlg

    @ 2, 2 BUTTON "&Test";
           ACTION ( oBtn:Disable(), TEST(), oBtn:Enable() )

    @ 3, 2 BUTTON oBtn PROMPT "&Close";
           ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


STATIC FUNCTION TEST()

    LOCAL oDlg

    DEFINE DIALOG oDlg

    @ 1, 2 BUTTON "&Close";
           ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


Try to click on Test and then on Close: the button Close lost its skin.

EMG

Re: skinbuttons problem

PostPosted: Wed Sep 08, 2010 5:26 pm
by Antonio Linares
Enrico,

This is a different problem.

Up to now we have not found a way to disable the skins and reenable them again

Re: skinbuttons problem

PostPosted: Wed Sep 08, 2010 5:28 pm
by Antonio Linares
Richard,

fivetech's download does not work from w7 !

We have just tested the download from W7 32 Ultimate and works fine.

Could some other users confirm if FWH download is working fine from W7 ? thanks! :-)

Re: skinbuttons problem

PostPosted: Wed Sep 08, 2010 5:31 pm
by Antonio Linares
Richard,

We fixed a bug related to mouse capture in skins, thus the test should be done with FWH 10.8, thanks :-)

Re: skinbuttons problem

PostPosted: Wed Sep 08, 2010 11:34 pm
by fraxzi
Dear Mr. Antonio and Mr. Richard,

Im using 10.6 and haven't encounter any problem with skinbutton().. im using it in xp/vista and win7.


Regards,
Frances