Enrico Maria Giordano wrote:Unfortunately, when I click on the icon the program freezes (and stay on top, difficult to terminate).
EMG
That is what am experiencing.. But not with FWH1802.
Enrico Maria Giordano wrote:Unfortunately, when I click on the icon the program freezes (and stay on top, difficult to terminate).
EMG
Enrico Maria Giordano wrote:Ok, I need a reduced and self-contained sample (PRG) of the problem. I can't help you with only the EXE.
EMG
Enrico Maria Giordano wrote:Sorry, no. I need of a reduced and self-contained sample.
EMG
nageswaragunupudi wrote:Please include dialog.prg of fwh1802 in your project and build your application with fwh1803. Does the problem still exist?
nageswaragunupudi wrote:So, now the only way is to try to create as simple program as possible to recreate the problem, as suggested by Mr. Enrico.
#include 'FiveWin.ch'
#include 'Ribbon.ch'
#include 'DTPicker.ch'
//----------------------------------------------------------------------------------------------------------------------------------------
GLOBAL oMDIFrame,;
oMDIRibon,;
oConnection
PROCEDURE uMain()
LOCAL oMenu,;
oIcon,;
oFont
LOCAL oTaskGrp,;
aTaskBtn := Array( 2 )
DEFINE ICON oIcon RESOURCE 'aaa'
DEFINE FONT oFont NAME 'Verdana' SIZE 0, -13
MENU oMenu 2010
ENDMENU
DEFINE WINDOW oMDIFrame MDI TITLE 'Test FWH1803->FWH184 Error';
From 1, 1 To 100, 100 PIXEL;
ICON oIcon
SET MSGBAR OF oMDIFrame 2010;
oMDIFrame:oMenu:END()
oMDIFrame:oMenu := NIL
DEFINE RIBBONBAR oMDIRibon WINDOW oMDIFrame 2010;
PROMPT 'Task',;
'Windows';
HEIGHT 64 TOPMARGIN 27;
ON CHANGE iif( nOption == 1, uError(), oMDIFrame:Cascade() )
WITH OBJECT oMDIRibon
:nOption := 2
:aEnable := {.T., .T.}
:SetFont( oFont )
:CalcPos()
END//with
ADD GROUP oTaskGrp RIBBON oMDIRibon TO OPTION 1
@ 01, 05 ADD BUTTON aTaskBtn[ 1 ] GROUP oTaskGrp;
BITMAP 'newdoc24' CENTER;
SIZE 34, 34;
TOOLTIP 'Open Dialog';
ACTION ( uError() )
ACTIVATE WINDOW oMDIFrame MAXIMIZED;
ON INIT ( uMariaDBConnection(),;
oMDIFrame:oWndClient:ClientEdge(),;
oMDIRibon:SetOption( 1 ) )
QUIT
RETURN
init PROCEDURE uInit()
REQUEST DBFCDX
rddsetdefault ( "DBFCDX" )
RETURN
//----------------------------------------------------------------------------------------------------------------------------------------
exit PROCEDURE uExit()
dbCloseAll()
RETURN
//----------------------------------------------------------------------------------------------------------------------------------------
Function uMariaDBConnection()
Try
oConnection := maria_Connect( '127.0.0.1',;
'walos',;
'root',;
'M1$@ieei',;
3306 )
if oConnection == nil
msginfo('ooops ... MariaDB')
else
oConnection:SelectDB( 'walos' )
endif
Catch oErr
if ValType( oErr ) == "O"
MsgStop( '::SubSystem ' + cValToChar( oErr:SubSystem ) + CRLF +;
'::SubCode ' + cValToChar( oErr:SubCode ) + CRLF +;
'::Operation ' + cValToChar( oErr:Operation ) + CRLF +;
'::Description ' + cValToChar( oErr:Description ) + CRLF +;
'::Argument ' + valToPrg( oErr:Args ), 'uMariaDBConnection()' )
endif
End
Return( nil )
#include 'FiveWin.ch'
#include 'Ribbon.ch'
#include 'DTPicker.ch'
//----------------------------------------------------------------------------------------------------------------------------------------
#define aRadio { {'A','Unoo'},;
{'B','Doss'},;
{'C','Tres'} }
GLOBAL EXTERNAL oMDIFrame,;
oMDIRibon,;
oConnection
GLOBAL aGet,;
aVar,;
oRS
//----------------------------------------------------------------------------------------------------------------------------------------
Function uError()
local oDlg,;
oTop,;
oFont,;
oFontSel
aGet := Array(6)
aVar := {'',CToD('//'),1,'',StrZero(1,8),''}
DEFINE FONT oFont NAME 'Verdana' SIZE 0, -12
DEFINE FONT oFontSel NAME 'Verdana' SIZE 0, -12 BOLD
DEFINE DIALOG oDlg RESOURCE 'DLG_RDTFORM' OF oMDIFrame;
TITLE 'FWH1804 - Error';
PIXEL TRANSPARENT;
FONT oFont
oDlg:lHelpIcon := .F.
REDEFINE BUTTONBAR oTop;
ID 1051 OF oDlg 2010
WITH OBJECT oTop
:bClrGrad := {|lInvert| IF( !lInvert, {{ 1, RGB( 255, 255, 255 ), RGB( 229, 233, 238 ) }},;
{{ 2/5, RGB( 255, 253, 222 ), RGB( 255, 231, 147 )},;
{ 3/5, RGB( 255, 215, 86 ), RGB( 255, 231, 153 )}} ) }
:bRClicked := {|| NIL }
END//with
DEFINE BUTTON OF oTop RESOURCE 'newdoc24' CENTER TRANSPARENT;
ACTION ( MsgInfo('Hello World!') );
TOOLTIP {'', ''}
REDEFINE GROUP ID 1001 OF oDlg TRANSPARENT;
FONT oFontSel
REDEFINE SAY ID 1002;
OF oDlg TRANSPARENT
REDEFINE GET aGet[1] VAR aVar[1];
ID 1003 OF oDlg UPDATE;
PICTURE '@!';
BITMAP 'finddoc16';
ACTION ( uRowSet() )
REDEFINE DTPICKER aGet[2] VAR aVar[2];
ID 1008 OF oDlg UPDATE;
PICTURE 'MM/DD/YYYY'
REDEFINE RADIO aGet[3] VAR aVar[3];
ID 1017, 1018, 1019;
OF oDlg UPDATE;
VALID ( aVar[4] := aRadio[aVar[3]][1], .T. )
REDEFINE GROUP ID 1004 OF oDlg TRANSPARENT;
FONT oFontSel
REDEFINE GET aGet[5] VAR aVar[5];
ID 1010 OF oDlg UPDATE;
PICTURE '@!' READONLY
aGet[5]:disable()
REDEFINE SAY ID 1012;
OF oDlg TRANSPARENT
REDEFINE GET aGet[6] VAR aVar[6];
ID 1013 OF oDlg UPDATE;
PICTURE '@!'
ACTIVATE DIALOG oDlg;
ON INIT ( oDlg:SetFont( oFont ),;
oDlg:oTop := oTop,;
oRecordSet() )
try
oFont:End()
oFont := NIL
catch
end//try
try
oFontSel:End()
oFontSel := NIL
catch
end//try
RETURN( nil )
//----------------------------------------------------------------------------------------------------------------------------------------
STATIC FUNCTION uRowSet() //HERE's THE SOURCE OF HANG-UP.....
LOCAL oSet
oSet := oConnection:RowSet( "SELECT rdt_reqnum, rdt_reqdat, rdt_mrnumb, rdt_mrdesc FROM rdt_forms WHERE rdt_mrnumb IS NOT NULL;", 50 )
if oSet == NIL
TRY
oSet:ShowError()
CATCH
END
else
TRY
oSet:lAutoExpand := .T.
oSet:lAutoPage := .T.
CATCH
END
oSet:MoveFirst()
uDialog()
TRY
oSet:Close()
oRS:Requery({ '0001' })
CATCH
END
ENDIF
RETURN( NIL )
//----------------------------------------------------------------------------------------------------------------------------------------
STATIC FUNCTION uDialog()
local oDlg,;
oBtn
local xRet
DEFINE DIALOG oDlg RESOURCE 'DLG_TEST'
oDlg:lHelpIcon := .F.
REDEFINE BUTTON oBtn ID 1001 OF oDlg ACTION ( oDlg:End() )
ACTIVATE DIALOG oDlg
RETURN( NIL )
//----------------------------------------------------------------------------------------------------------------------------------------
STATIC FUNCTION oRecordSet()
oRS := oConnection:RowSet( "SELECT * FROM rdt_forms WHERE rdt_mrnumb = ?;", {'-1'} )
if oRS == NIL
Try
oRS:ShowError()
Catch
End
else
oRS:Cancel()
if !oRS:Append()
MsgStop('Unable to add record at this time.. Please LogOFF/LogON again.', 'ADDING RECORD')
endif
endif
RETURN( NIL )
#define MANIFEST 24
1 MANIFEST "WindowsXP.Manifest"
aaa ICON DISCARDABLE "walos 48 h i8.ico"
finddoc16 BITMAP DISCARDABLE "Find Document 16 h m.bmp"
newdoc24 BITMAP DISCARDABLE "Add Document 3 24 h m.bmp"
DLG_RDTFORM DIALOGEX 0,0,278,118
CAPTION "Request for Delivery / Transfer"
FONT 9,"Verdana",400,0,0
STYLE WS_VISIBLE|WS_CAPTION|WS_SYSMENU|DS_CENTER|DS_SYSMODAL
BEGIN
CONTROL "",1051,"ToolbarWindow32",WS_CHILDWINDOW|WS_VISIBLE|TBSTYLE_FLAT|TBSTYLE_WRAPABLE|TBSTYLE_TOOLTIPS|CCS_NORESIZE|CCS_BOTTOM,2,2,42,18
CONTROL "Group",1001,"Button",WS_CHILDWINDOW|WS_VISIBLE|BS_GROUPBOX,2,30,88,36,WS_EX_TRANSPARENT
CONTROL "No:",1002,"Static",WS_CHILDWINDOW|WS_VISIBLE|SS_CENTERIMAGE,6,54,15,11,WS_EX_TRANSPARENT
CONTROL "MR Number",1003,"Edit",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP,26,52,63,13,WS_EX_CLIENTEDGE|WS_EX_TRANSPARENT
CONTROL "",1008,"SysDateTimePick32",WS_CHILDWINDOW|WS_VISIBLE|WS_DISABLED|WS_TABSTOP|DTS_SHOWNONE,92,52,61,13,WS_EX_TRANSPARENT
CONTROL "Delivery",1017,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP|BS_AUTORADIOBUTTON,162,54,36,12,WS_EX_TRANSPARENT
CONTROL "Transfer",1018,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP|BS_AUTORADIOBUTTON,202,52,38,14,WS_EX_TRANSPARENT
CONTROL "Pullout",1019,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP|BS_AUTORADIOBUTTON,242,52,38,14,WS_EX_TRANSPARENT
CONTROL "To:",1012,"Static",WS_CHILDWINDOW|WS_VISIBLE|SS_CENTERIMAGE,7,100,17,11,WS_EX_TRANSPARENT
CONTROL "",1013,"Edit",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP,26,98,127,14,WS_EX_CLIENTEDGE|WS_EX_TRANSPARENT
CONTROL "Group",1004,"Button",WS_CHILDWINDOW|WS_VISIBLE|BS_GROUPBOX,2,76,152,36,WS_EX_TRANSPARENT
CONTROL "",1010,"Edit",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP|ES_READONLY,92,84,61,13,WS_EX_CLIENTEDGE|WS_EX_TRANSPARENT
END
DLG_TEST DIALOGEX 0,0,72,46
FONT 9,"Verdana",0,0,0
STYLE WS_POPUP|WS_VISIBLE|WS_THICKFRAME
BEGIN
CONTROL "CLOSE",1001,"Button",WS_CHILDWINDOW|WS_VISIBLE|WS_TABSTOP,18,16,34,14
END
oCn := FW_DemoDB()
if oCn == nil
? "connect fail"
return nil
endif
//<work with the connection>
oCn:Close()
oRs := oCn:RowSet( "select * from customer where state = ?", { "NY" } )
if oRs == nil
? "Fail"
return nil
else
// XBROWSER oRs
// other work
oRs:Close()
endif
#include "fivewin.ch"
static oCn
function Main()
local oDlg
oCn := FW_DemoDB()
DEFINE DIALOG oDlg
@ 10,10 BUTTON "OpenRowSet" SIZE 100,14 PIXEL OF oDlg ;
ACTION OpenRowSet()
ACTIVATE DIALOG oDlg CENTERED
oCn:Close()
return nil
function OpenRowset()
local oRs
CursorWait()
oRs := oCn:RowSet( "customer" )
///MsgInfo( "CLOSE" ) // NO ERROR
uDialog() // CRASH
oRs:Close()
oRs := nil
return nil
function uDialog()
local oDlg
DEFINE DIALOG oDlg COLOR CLR_WHITE,CLR_GREEN
@ 40,10 BUTTON "CLOSE" SIZE 80,14 PIXEL OF oDlg ;
ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
return nil
#include "fivewin.ch"
static oCn
function Main()
local oDlg
oCn := FW_DemoDB()
DEFINE DIALOG oDlg
@ 10,10 BUTTON "OpenRowSet" SIZE 100,14 PIXEL OF oDlg ;
ACTION OpenRowSet( oDlg )
ACTIVATE DIALOG oDlg CENTERED
oCn:Close()
return nil
function OpenRowset( oDlg1 )
local oRs
CursorWait()
oRs := oCn:RowSet( "customer" )
///MsgInfo( "CLOSE" ) // NO ERROR
uDialog( oDlg1 ) // CRASH
oRs:Close()
oRs := nil
return nil
function uDialog( oDlg1 )
local oDlg
DEFINE DIALOG oDlg COLOR CLR_WHITE,CLR_GREEN OF oDlg1
@ 40,10 BUTTON "CLOSE" SIZE 80,14 PIXEL OF oDlg ;
ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED IN PARENT
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 30 guests