James Bott wrote:Rao,
Rick is using version 9.04, not 9.06. I expect the same code would still work wouldn't it?
James
Application
===========
Path and name: J:\VEHICLE\Veh32.Exe (32 bits)
Size: 969,728 bytes
Time from start: 0 hours 20 mins 40 secs
Error occurred at: 08/10/2009, 14:16:06
Error description: Error ADODB.Recordset/6 DISP_E_UNKNOWNNAME: RECORDCOUNT
Args:
Stack Calls
===========
Called from: source\rtl\win32ole.prg => TOLEAUTO:RECORDCOUNT(0)
Called from: xbrowse.prg => (b)TXBROWSE:SETADO(3750)
Called from: xbrowse.prg => TXBROWSE:PAINT(1254)
Called from: xbrowse.prg => TXBROWSE:DISPLAY(957)
Called from: .\source\classes\CONTROL.PRG => TXBROWSE:HANDLEEVENT(1423)
Called from: .\source\classes\WINDOW.PRG => _FWH(3333)
Called from: => DIALOGBOXINDIRECT(0)
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(273)
Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG(343)
Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS(27)
Called from: source\rtl\win32ole.prg => TOLEAUTO:RECORDCOUNT(0)
Called from: xbrowse.prg => (b)TXBROWSE:SETADO(3750)
Called from: xbrowse.prg => TXBROWSE:PAINT(1254)
Called from: xbrowse.prg => TXBROWSE:DISPLAY(957)
Called from: .\source\classes\CONTROL.PRG => TXBROWSE:HANDLEEVENT(1423)
Called from: .\source\classes\WINDOW.PRG => _FWH(3333)
Called from: => WINRUN(0)
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE(952)
Called from: MAIN.PRG => MAIN(381)
System
======
CPU type: AMD Athlon(tm) 64 X2 Dual Core Processor 5000+ 2600 Mhz
Hardware memory: 2047 megs
Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %
Compiler version: xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 6406)
Windows version: 5.1, Build 2600 Service Pack 2
James Bott wrote:Enrico,
Apparently not, since it is an intermitant problem. Rick says it is only happening on two computers.
In summary the issue is that the browse cannot be closed until the window is closed, and the recordset needs to be closed before the window. Under some circumstances if you close the recordset right before the window is closed, then the browse does a redisplay and the program crashes.
James
#include "FiveWin.ch"
#include "xbrowse.ch"
function Main()
local oWnd, oBrw
DEFINE Window oWnd
define buttonbar oBar of oWnd
define button of oBar action oBrw:End()
@ 0, 0 XBROWSE oBrw OF oWnd ARRAY { { "one","two","three" } } AUTOCOLS
oBrw:CreateFromCode()
oWnd:oClient:= oBrw
activate window oWnd
return nil
Rick Lipkin wrote:Enrico
Using 9.06 the sample closed the listbox but not the window ..
Rick Lipkin wrote:oBrw:End() closes the listbox but leaves the Window open and subject to 'paint'
#include "FiveWin.ch"
#include "xbrowse.ch"
function Main()
local oWnd, oBrw, oBar, aArray := { { "one","two","three" } }
DEFINE Window oWnd
define buttonbar oBar of oWnd
define button of oBar action (oBrw:End(), oBrw:setArray({}), ;
oBrw:display(), msgInfo(valtype(oBrw)) )
@ 0, 0 XBROWSE oBrw OF oWnd ARRAY aArray AUTOCOLS
oBrw:CreateFromCode()
oWnd:oClient:= oBrw
activate window oWnd
return nil
James Bott wrote:Yes, you will see that it is destroyed, but in fact it is not. Try this line instead:
define button of oBar action (oBrw:End(), oBrw:display(), msgInfo(valtype(oBrw)) )
It does not error out when oBrw:display() is called, and oBrw is still an "O" type, thus not destroyed. So, even though it is not visible, it still exists and is functioning.
James Bott wrote:Enrico,
OK, here is a working example that errors out.
===========
Path and name: C:\Documents and Settings\James\My Documents\Projects\Temp\Test05.exe (32 bits)
Size: 1,773,056 bytes
Time from start: 0 hours 0 mins 2 secs
Error occurred at: 08/12/09, 12:51:10
Error description: Error BASE/1132 Bound error: array access
Args:
[ 1] = A { ... }
[ 2] = N 0
Stack Calls
===========
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE:TXBROWSE(423)
Called from: => TXBROWSE:COLATPOS(0)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINT(1085)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DISPLAY(946)
Called from: Test05.prg => (b)MAIN(11)
...
James Bott wrote:Enrico,
Are you sure you ran the right test program?
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 68 guests