Page 1 of 1

oWnd:End(), oDlg:End()

PostPosted: Sun Jul 29, 2007 2:59 am
by xProgrammer
Hi Antonio

Have started trying to port an actual application.

It seems that neither oWnd:End() nor oDlg:End() work as anticipated.

When I compile the code below Selecting File Exit from the menu does nothing except stop Help About from working, and if I go Help About and hit the Exit button once nothing happens - hit it a second time and the application exits altogether. But the "X" buttons at top right of both the Help About dialog and the main Window seem to work fine. It looks as if oWnd:End() and oDlg:End() don't work properly or at least as I expected and how they do under FiveWin.

Any solutions? Or have I done something wrong? or misunderstanding something?

Here is my code:

//PatMatch.prg




#include "FiveLinux.ch"

// #include "objects.ch"



#define idProgName "File Match Software"

#define idVersion "0.1.1"

#define idCopName "Finalysis Pty. ltd."

#define idCopDate "2007"

#define idBldDate "25 July 2007"



STATIC oWnd



FUNCTION Main()



// oChecker := CHECKER():Create()

DEFINE WINDOW oWnd TITLE "File Match Software - (c) Finalysis 2007" ;

MENU BldInMenu()

ACTIVATE WINDOW oWnd MAXIMIZED



RETURN



FUNCTION BldInMenu()



LOCAL lomMenu



MENU lomMenu

MENUITEM "&File"

MENU

// MENUITEM "&Match" ACTION oChecker:ShowProDlg()
MENUITEM "&Exit" ACTION Exit()

ENDMENU

MENUITEM "&Help"

MENU

MENUITEM "&About" ACTION VerInfo()

ENDMENU

ENDMENU


RETURN lomMenu



FUNCTION VerInfo()



LOCAL lodAbout



DEFINE DIALOG lodAbout TITLE "About Patient Match Software"

@ 2, 2 SAY ( idProgName + " - Version: " + idVersion ) OF lodAbout

@ 4, 2 SAY ( "Build Date: " + idBldDate ) OF lodAbout

@ 6, 2 SAY ( "(c) " + idCopName + " " + idCopDate ) OF lodAbout

@ 8, 2 BUTTON "OK" ACTION ( lodAbout:End() ) ;

OF lodAbout

ACTIVATE DIALOG lodAbout CENTERED



RETURN

Function Exit()

CLS
QUIT

RETURN

PostPosted: Sun Jul 29, 2007 12:59 pm
by Antonio Linares
Doug,

We email you new libraries with some changes and also a modified version of your PRG. With these new files is working fine