FWH 18.03 Dialog Problem (SOLVED)

Re: FWH 18.03 Dialog Problem (STILL)

Postby fraxzi » Tue Jun 05, 2018 8:47 am

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.
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: FWH 18.03 Dialog Problem (STILL)

Postby Enrico Maria Giordano » Tue Jun 05, 2018 8:57 am

Ok, I need a reduced and self-contained sample (PRG) of the problem. I can't help you with only the EXE.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8723
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: FWH 18.03 Dialog Problem (STILL)

Postby fraxzi » Tue Jun 05, 2018 9:04 am

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



Hi Enrico,

I will send you my entire project file ( just got started ) .. using xMate.
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: FWH 18.03 Dialog Problem (STILL)

Postby Enrico Maria Giordano » Tue Jun 05, 2018 9:25 am

Sorry, no. I need of a reduced and self-contained sample.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8723
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: FWH 18.03 Dialog Problem (STILL)

Postby fraxzi » Wed Jun 06, 2018 12:29 am

Enrico Maria Giordano wrote:Sorry, no. I need of a reduced and self-contained sample.

EMG



Hi Enrico,

Please consider that a small sample ... i don't know which component[s] are misbehaving.. The fact that in FWH1802 there are no issues.
I hope to move-on to FWH1803->FWH1804 and so on...

Thanks,
Frances
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: FWH 18.03 Dialog Problem (STILL)

Postby nageswaragunupudi » Wed Jun 06, 2018 12:45 am

Please include dialog.prg of fwh1802 in your project and build your application with fwh1803. Does the problem still exist?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10685
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FWH 18.03 Dialog Problem (STILL)

Postby fraxzi » Wed Jun 06, 2018 1:58 am

nageswaragunupudi wrote:Please include dialog.prg of fwh1802 in your project and build your application with fwh1803. Does the problem still exist?



Hi Rao,

I included the \FWH1802\SOURCE\CLASSES\DIALOG.PRG as instructed and recompiled all ... Problem persisted.
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: FWH 18.03 Dialog Problem (STILL)

Postby nageswaragunupudi » Wed Jun 06, 2018 2:05 am

So, now the only way is to try to create as simple program as possible to recreate the problem, as suggested by Mr. Enrico.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10685
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FWH 18.03 Dialog Problem (STILL)

Postby fraxzi » Wed Jun 06, 2018 3:28 am

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.



Hi Rao,

I created a small sample ... it works on FWH1803 and FWH1804 ...
When I added MariaDB routines it FAILED ... But when compiled with FWH1802, Clearly there is no issue.
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: FWH 18.03 Dialog Problem (STILL)

Postby fraxzi » Wed Jun 06, 2018 3:36 am

small sample: Requires MariaDB

Code: Select all  Expand view  RUN

#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 )
 


Simple routine to simulate error:
Code: Select all  Expand view  RUN

#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 )
 


.RC
Code: Select all  Expand view  RUN

#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
 


Please change any field in oRS and oSet (MariaDB's) and any bitmap in .RC as well as connection parameter with MariaDB
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: FWH 18.03 Dialog Problem (STILL)

Postby fraxzi » Wed Jun 06, 2018 3:42 am

Hi Rao,

All along I thought it was the DIALOG... It is the MariaDB Recordset?
Please correct my initial understanding im new to FWH's MariaDB RecordSet..
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: FWH 18.03 Dialog Problem (STILL)

Postby nageswaragunupudi » Wed Jun 06, 2018 8:06 am

We can not test this because we do not have your mariadb database with us.
To help discussions in our forums, we are maintaining a demo server.

You maay connect to the demoserver with:
Code: Select all  Expand view  RUN

oCn := FW_DemoDB()
if oCn == nil
   ? "connect fail"
   return nil
endif
//<work with the connection>
oCn:Close()
 

You need not use TRY/CATCH with any FWH Mariadb functions/methods.

For the purpose of the sample, you may use customer table on the server.
Code: Select all  Expand view  RUN

oRs := oCn:RowSet( "select * from customer where state = ?", { "NY" } )
if oRs == nil
  ? "Fail"
  return nil
else
  // XBROWSER oRs
  // other work
  oRs:Close()
endif
 


First please try with DIALOG from source, instead of from RESOURCE.
That will give us a hint if the problem is with using resources.

I would be glad if you recast your sample in these lines, so that we can all build your sample and test.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10685
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FWH 18.03 Dialog Problem (STILL)

Postby nageswaragunupudi » Wed Jun 06, 2018 5:54 pm

This is a small sample program to reproduce the problem.
Anyone can build and see.
Code: Select all  Expand view  RUN
#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
 

Copy the program to fwh\samples folder and use buildh.bat or buildx.bat.

This program works well with Harbour in all versions
But crashes with xHarbour with FWH 1803 and FWH1804, but works well with FWH1802
Interestingly, instead of calling uDialog, if we call MsgInfo() the program runs well.

Can any other users test this sample and confirm the behaviour?

We are looking into the issue.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10685
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: FWH 18.03 Dialog Problem (STILL)

Postby cnavarro » Wed Jun 06, 2018 11:03 pm

Please test this

Code: Select all  Expand view  RUN


#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
 
 
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6550
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: FWH 18.03 Dialog Problem (STILL)

Postby nageswaragunupudi » Thu Jun 07, 2018 12:03 am

This also is crashing
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10685
Joined: Sun Nov 19, 2006 5:22 am
Location: India

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 10 guests