SBUTTON vs BTNBMP

bradmaudlin
Posts: 27
Joined: Fri Jan 11, 2008 9:58 pm
Location: St Joe, MO

SBUTTON vs BTNBMP

Post by bradmaudlin »

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?

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
User avatar
karinha
Posts: 7928
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 3 times
Contact:

Re: SBUTTON vs BTNBMP

Post by karinha »

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
User avatar
Silvio.Falconi
Posts: 7120
Joined: Thu Oct 18, 2012 7:17 pm

Re: SBUTTON vs BTNBMP

Post by Silvio.Falconi »

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 November 2023 - January 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
User avatar
nageswaragunupudi
Posts: 10720
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: SBUTTON vs BTNBMP

Post by nageswaragunupudi »

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
User avatar
dutch
Posts: 1554
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: SBUTTON vs BTNBMP

Post by dutch »

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 19.01 / 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)
User avatar
Antonio Linares
Site Admin
Posts: 42454
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 20 times
Been thanked: 58 times
Contact:

Re: SBUTTON vs BTNBMP

Post by Antonio Linares »

Do we have the source code for SBUTTON ?

We may find and fix the memory leak :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
ADutheil
Posts: 368
Joined: Sun May 31, 2009 6:25 pm
Location: Salvador - Bahia - Brazil

Re: SBUTTON vs BTNBMP

Post by ADutheil »

Regards,

André Dutheil
FWH 13.04 + HB 3.2 + MSVS 10
bradmaudlin
Posts: 27
Joined: Fri Jan 11, 2008 9:58 pm
Location: St Joe, MO

Re: SBUTTON vs BTNBMP

Post by bradmaudlin »

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

Merry Christmas everyone.
Brad
User avatar
Otto
Posts: 6401
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 12 times
Been thanked: 2 times
Contact:

Re: SBUTTON vs BTNBMP

Post by Otto »

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.
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Antonio Linares
Site Admin
Posts: 42454
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 20 times
Been thanked: 58 times
Contact:

Re: SBUTTON vs BTNBMP

Post by Antonio Linares »

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

Antonio Linares
www.fivetechsoft.com
ADutheil
Posts: 368
Joined: Sun May 31, 2009 6:25 pm
Location: Salvador - Bahia - Brazil

Re: SBUTTON vs BTNBMP

Post by ADutheil »

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
User avatar
Antonio Linares
Site Admin
Posts: 42454
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 20 times
Been thanked: 58 times
Contact:

Re: SBUTTON vs BTNBMP

Post by Antonio Linares »

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
bradmaudlin
Posts: 27
Joined: Fri Jan 11, 2008 9:58 pm
Location: St Joe, MO

Re: SBUTTON vs BTNBMP

Post by bradmaudlin »

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
User avatar
Antonio Linares
Site Admin
Posts: 42454
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 20 times
Been thanked: 58 times
Contact:

Re: SBUTTON vs BTNBMP

Post by Antonio Linares »

Brad,

Yes, the right tool for it.

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

Antonio Linares
www.fivetechsoft.com
User avatar
Silvio.Falconi
Posts: 7120
Joined: Thu Oct 18, 2012 7:17 pm

Re: SBUTTON vs BTNBMP

Post by Silvio.Falconi »

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 November 2023 - January 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
Post Reply