FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour SBUTTON vs BTNBMP
Posts: 27
Joined: Fri Jan 11, 2008 09:58 PM
SBUTTON vs BTNBMP
Posted: Mon Oct 25, 2021 09:18 PM

I have a Touch Screen Point of Sale program that uses a lot of pop up dialogs with a virtual pin pad (0 - 9 and a few other functions).
I am having to problems, one when I use BTNBMP and the other when I use SBUTTON.
1. When I use BTNBMP you can't click (touch) too fast or it will miss a character. I believe it thinks you are "double" clicking the button instead of 2 single clicks. Using SBUTTON I get every button click as fast as you can click.
Is there a way to turn off the double click functionality in the BTNBMP class?

  1. When I use SBUTTON it have a memory leak. I have tested the same code with BTNBMP buttons and SBUTTON button. Watching the Task Manager my program starts out at 15.2MB for both. After only 20 transactions the BTNBMP version is at 15.6MB while the SBUTTON version is at 19.6MB. I have tried putting a Memory(0) call at the end of each transaction, but it did nothing.
    Does anyone have a SBUTTON version that doesn't leak memory? The memory leak only seems to happen when the button is created. If I create the dialog and press the buttons 2 times or 200 times i get the same memory leak amount (about .2MB).

Is there a different BUTTON class that might work for me?

Thanks
Brad

Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: SBUTTON vs BTNBMP
Posted: Tue Oct 26, 2021 10:28 PM

Good evening, we highly recommend that you remove SBUTTON from your program.
Change everything to BUTTONBMP and test. Then test only with BTNBMP or another BUTTON(RButton, for example) model of FiveWin. See \samples. Eliminate SBUTTON from your entire project, urgently!

Regards, saludos.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: SBUTTON vs BTNBMP
Posted: Wed Oct 27, 2021 07:14 AM

my cent

for the beach program I always used Sbutton at the beginning, then someone had made me a particular VControl class where the button was not an ID control but was virtual later as the class no longer worked with new versions of fwh i used btnbmp.
For example, I have a screen of a beach with 40x20 buttons or 800

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: SBUTTON vs BTNBMP
Posted: Wed Oct 27, 2021 09:15 PM

I have a Touch Screen Point of Sale program that uses a lot of pop up dialogs with a virtual pin pad (0 - 9 and a few other functions).
I am having to problems, one when I use BTNBMP and the other when I use SBUTTON.
1. When I use BTNBMP you can't click (touch) too fast or it will miss a character. I believe it thinks you are "double" clicking the button instead of 2 single clicks. Using SBUTTON I get every button click as fast as you can click.
Is there a way to turn off the double click functionality in the BTNBMP class?


There is no double click functionality for BTNBMP. Anyway we will do extensive tests with BTNBMP on touch screen and try to improve the performance and get back to you.


Does anyone have a SBUTTON version that doesn't leak memory?

Please consult Mr. Dutch, Thailand. You will find him on these forums.
Regards



G. N. Rao.

Hyderabad, India
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: SBUTTON vs BTNBMP
Posted: Fri Dec 24, 2021 02:47 AM
Dear bradmaudlin,

I test SBUTTON as your issue (touch pos). I got the same memory leak and SBUTTON display shows slowly after 10 mins and 20 mins (quite slow display).
I don't change to another button object yet.
bradmaudlin wrote:I have a Touch Screen Point of Sale program that uses a lot of pop up dialogs with a virtual pin pad (0 - 9 and a few other functions).
2. When I use SBUTTON it have a memory leak. I have tested the same code with BTNBMP buttons and SBUTTON button. Watching the Task Manager my program starts out at 15.2MB for both. After only 20 transactions the BTNBMP version is at 15.6MB while the SBUTTON version is at 19.6MB. I have tried putting a Memory(0) call at the end of each transaction, but it did nothing.
Does anyone have a SBUTTON version that doesn't leak memory? The memory leak only seems to happen when the button is created. If I create the dialog and press the buttons 2 times or 200 times i get the same memory leak amount (about .2MB).

Is there a different BUTTON class that might work for me?

Thanks
Brad
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: SBUTTON vs BTNBMP
Posted: Sat Dec 25, 2021 09:09 AM

Do we have the source code for SBUTTON ?

We may find and fix the memory leak :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 368
Joined: Sun May 31, 2009 06:25 PM
Re: SBUTTON vs BTNBMP
Posted: Sat Dec 25, 2021 11:01 AM
Regards,



André Dutheil

FWH 13.04 + HB 3.2 + MSVS 10
Posts: 27
Joined: Fri Jan 11, 2008 09:58 PM
Re: SBUTTON vs BTNBMP
Posted: Sat Dec 25, 2021 02:42 PM

Antonio,
Thank you very much!!
I really like the performance of SButton over Btnbmp.

Merry Christmas everyone.
Brad

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: SBUTTON vs BTNBMP
Posted: Sat Dec 25, 2021 06:02 PM

https://mybergland.com/fwforum/tsbutton.zip
Hello, can you please download this version?
I will remember I fixed speed and memory problems.
Can you please compare against your version?

Best regards,
Otto

PS Manuel allowed us to post the code. Please search for his email.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: SBUTTON vs BTNBMP
Posted: Sun Dec 26, 2021 08:04 AM

Now we have two versions and Otto's one seems to be more recent...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 368
Joined: Sun May 31, 2009 06:25 PM
Re: SBUTTON vs BTNBMP
Posted: Sun Dec 26, 2021 11:51 AM

Otto's version is based on the 6.1 release while the other one is the latest 7.0 posted by Manuel Mercado.

Regards,



André Dutheil

FWH 13.04 + HB 3.2 + MSVS 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: SBUTTON vs BTNBMP
Posted: Sun Dec 26, 2021 05:39 PM

André,

Manuel's code is not simple.

Please use FWH function SetResDebug() as explained here:

http://wiki.fivetechsoft.com/doku.php?i ... etresdebug

http://wiki.fivetechsoft.com/doku.php?i ... ts_handles

and please let me know what you get

many thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 27
Joined: Fri Jan 11, 2008 09:58 PM
Re: SBUTTON vs BTNBMP
Posted: Tue Dec 28, 2021 03:12 AM

Thanks Otto. I will try your version and let everyone know how it works.

I will probably be asking you (Otto) some questions soon. I have just installed mod harbour and have started playing with it.
I have a new project to communicate with some new Vending Machine equipment. I need to create a local web server app that will use SOAP/XML protocols and still be able to access all of my DBF files I use with my Point of Sale software. Right now I'm working on the communications side using php. Once this is done then I will need to update my databases.
Does this sound like a good use for mod harbour??

Thanks,
Brad

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: SBUTTON vs BTNBMP
Posted: Tue Dec 28, 2021 08:43 AM

Brad,

Yes, the right tool for it.

You may test it and see what results you get :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: SBUTTON vs BTNBMP
Posted: Tue Dec 28, 2021 11:28 AM
Antonio Linares wrote:Brad,

Yes, the right tool for it.

You may test it and see what results you get :-)


Antonio,
that if by now I have left sbutton for just the same reason (memory loss), if you find how to fix the bug I would like to have a copy of the tsbutton class to test it with my old version of the Pos program that I had done many years ago.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com