FWH 1510: Problem with Buttonbar in Dialog

FWH 1510: Problem with Buttonbar in Dialog

Postby TimStone » Sat Dec 12, 2015 12:40 am

We were delighted to receive the ability to put a buttonbar into a dialog in 1504. I re-coded all dialogs where this was appropriate and it has worked fine ... until now.

If one reviews the suggested useage, and control, we have a tbar control, ID 100, that we place in the dialogs. This has never created a problem. Suddenly, with this version, we are finding an error that ID 100 does not exist. Of course, it is there. Also, it happens on some computers ( running Windows 10 ) and does not on other ones ( also running Windows 10 ).

Was there a coding change in 1510 that may have caused this ?

Input is greatly appreciated.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: FWH 1510: Problem with Buttonbar in Dialog

Postby Antonio Linares » Sat Dec 12, 2015 8:46 pm

Tim,

I just tested FWH\samples\barfrmrc.prg and it is working fine on my Windows 10

Could you please build it and test it ? thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FWH 1510: Problem with Buttonbar in Dialog

Postby TimStone » Sat Dec 12, 2015 9:56 pm

The problem is that it does not occur on my computer. It only occurs at the client's location. He has it happening on two different computers, one running Win 10, and the other running Win 7. I have a machine just like his Win 10 computer ( Samsung AIO ), and it works fine on mine but not on his. I even put the exact same software on both computers and his fails, mine does not.

The error he gets is: ( but we get the same error on several different functions that are different but all access the toolbar in a resource / Dialog now )

Application
===========
Path and name: C:\ASW10c\asw10.exe (32 bits)
Size: 9,678,848 bytes
Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20151017)
FiveWin Version: FWHX 15.10
Windows version: 6.2, Build 9200

Time from start: 0 hours 0 mins 13 secs
Error occurred at: 12/11/15, 14:52:02
Error description: Error FiveWin/1 Non defined Id: No: 100

Stack Calls
===========
Called from: .\source\classes\CONTROL.PRG => TCONTROL:INITIATE( 413 )
Called from: .\source\classes\BAR.PRG => TBAR:INITIATE( 282 )
Called from: => __OBJSENDMSG( 0 )
Called from: => HB_EXECFROMARRAY( 0 )
Called from: .\source\function\HARBOUR.PRG => OSEND( 295 )
Called from: => HB_EXECFROMARRAY( 0 )
Called from: .\source\function\HARBOUR.PRG => ASEND( 273 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:INITIATE( 644 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 889 )
Called from: => DIALOGBOX( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 293 )
Called from: C:\projects\MLS2015\source\mListEditor.prg => LIST02( 324 )
Called from: C:\projects\MLS2015\source\asw2015.prg => (b)MAIN( 451 )
Called from: .\source\classes\MENU.PRG => TMENU:ACTIVATE( 1085 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:SHOWPOPUP( 1734 )
Called from: C:\projects\MLS2015\source\asw2015.prg => (b)MAIN( 520 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 638 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 869 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1723 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 1705 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3602 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1020 )
Called from: C:\projects\MLS2015\source\asw2015.prg => MAIN( 568 )

S
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: FWH 1510: Problem with Buttonbar in Dialog

Postby Antonio Linares » Sun Dec 13, 2015 5:49 am

Tim,

Please post here the section of your RC where ID 100 is defined, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FWH 1510: Problem with Buttonbar in Dialog

Postby TimStone » Sun Dec 13, 2015 3:10 pm

NOTEBOOK DIALOG 0, 0, 660, 410
STYLE WS_POPUP | WS_CAPTION
CAPTION "System Notebook"
{
CONTROL "", 100, "TBar", 0|WS_CHILD|WS_VISIBLE, 0,0, 660, 30
CONTROL "",4308,"TxBrowse",WS_TABSTOP,10,215,640,185
EDITTEXT 4307,50,40,80,13
EDITTEXT 4306,220,40,140,13
EDITTEXT 4305,450,40,150,13
EDITTEXT 4303,10,60,360,145
CONTROL "",4304,"TImage",WS_TABSTOP,380,60,270,145
LTEXT "Title",-1,20,40,20,13
LTEXT "Description",-1,150,40,45,13
LTEXT "Image File",-1,380,40,60,13
}
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: FWH 1510: Problem with Buttonbar in Dialog

Postby TimStone » Thu Dec 17, 2015 5:04 pm

RESOLVED - but not sure why:

The example provided when this capability ( Button Bar for Dialog in same function as other code ) was introduced use a resource ID # of 100. Normally that should not be a problem.

In this case, I was blind because I could not duplicate the problem on any of my computers, but it always happened on my client's computers. That puzzles me.

First, I went through and made sure the REDEFINE BUTTONBAR variable was declared as a LOCAL in each function where it was used. I figured we had a problem not releasing the ID in memory, and there was a conflict perhaps reloading it. That didn't help.

Then I went through and reassigned ID numbers other than 100 in all cases. That resolved the problem. There were no conflicts in any of the dialog resource files with the ID 100, but apparently somewhere in the system something is stored that was blocking it. I have no idea why, or where, but at least it is now working.

By the way, it was not just one dialog. It was on about 20% of them. It's all very strange ... but after all, programming is certainly more complex now with all of the new capabilities.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2904
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: FWH 1510: Problem with Buttonbar in Dialog

Postby Antonio Linares » Fri Dec 18, 2015 12:53 pm

Tim,

That happens sometimes on Windows: without any specific reason a certain resource ID gives troubles sometimes.

I forgot to mention you what you have already discovered, that changing the ID can solve the problem.

Thanks for the reminder :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 70 guests