nowait
- Silvio.Falconi
- Posts: 7104
- Joined: Thu Oct 18, 2012 7:17 pm
nowait
I open dbf with tdatabase why make error ?
is it possible to use a dialog in source (and not in resource) using the NOWAIT clause?
Meaning what
DEFINE DIALOG oDlg SIZE nWd, nHt PIXEL TRUEPIXEL;
FONT oFont COLOR CLR_BLACK, DLG_nColorDlg
ACTIVATE DIALOG oDlg NOWAIT
RETURN (NIL)
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Re: nowait
Hello, you must show how you are doing the OPENING of the Database, because the ERRSYSW.prg is saying that the OPEN AREA IS NOT IN USE.
Hola, debes mostrar como estas haciendo la APERTURA de la Base de Datos, porque el ERRSYSW.prg esta diciendo que el AREA ABIERTA NO ESTÁ EN USO.
And why does this DIALOGUE need to be NOWAIT?
¿Y por qué este DIÁLOGO necesita ser NOWAIT?
Regards, saludos.
Hola, debes mostrar como estas haciendo la APERTURA de la Base de Datos, porque el ERRSYSW.prg esta diciendo que el AREA ABIERTA NO ESTÁ EN USO.
And why does this DIALOGUE need to be NOWAIT?
¿Y por qué este DIÁLOGO necesita ser NOWAIT?
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Re: nowait
Se que no es lo que necesitas porque usas tdatabase, pero tal vez te de un hilo para seguir.
Los xbrowse con dialogos nowait funcionan bien, pero si cerramos un area de un dialogo que esta activo, ahi obtenemos el error.
Intuyo que por ese lado viene el problema
Code: Select all | Expand
#include "FiveWin.ch"
static oWnd
static lEnd := .f., nArea
//----------------------------------------------------------------------------//
function Main()
nArea := 0
DEFINE WINDOW oWnd TITLE "Dialogo NoWait"
@ 2, 2 BUTTON "&Start" SIZE 80, 20 ACTION StartTest()
@ 2, 20 BUTTON "&Info" SIZE 80, 20 ACTION MsgInfo(select())
@ 2, 40 BUTTON "&Close Area" SIZE 80, 20 ACTION dbclosearea(select()) // Esto es para que de error al querer volver a ese dialogo nowait
ACTIVATE WINDOW oWnd MAXIMIZED
return nil
//----------------------------------------------------------------------------//
function StartTest()
local oDlg
local oBrw , n
nArea ++
n := nArea
USE Customer ALIAS "customer"+ALLTRIM(STR(nArea)) SHARED NEW
INDEX ON Field->State TO State
SET ORDER TO "State"
DEFINE DIALOG oDlg TITLE "No Wait Customer"+ALLTRIM(STR(nArea)) FROM 10, 10 TO 23, 70 RESIZABLE
@ 01,01 XBROWSE oBrw OF oDlg ;
LINES STYLE FLAT NOBORDER ;
COLUMNS "State","City", "Last", "First" ;
HEADERS "State","City", "Last", "First" PIXEL SIZE 200,70
oBrw:nMarqueeStyle = MARQSTYLE_HIGHLROW
oBrw:CreateFromCode()
oBrw:bGotFocus := {|| dbselectarea(oBrw:cAlias)}
ACTIVATE DIALOG oDlg NOWAIT VALID(Cerrar(n))
SysRefresh()
return nil
STATIC FUNCTION Cerrar(n)
dbclosearea( "customer"+ALLTRIM(STR(nArea)))
RETURN .t.
//----------------------------------------------------------------------------//
Intuyo que por ese lado viene el problema
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: nowait
Silvio.Falconi wrote:
I open dbf with tdatabase why make error ?
is it possible to use a dialog in source (and not in resource) using the NOWAIT clause?
Meaning what
DEFINE DIALOG oDlg SIZE nWd, nHt PIXEL TRUEPIXEL;
FONT oFont COLOR CLR_BLACK, DLG_nColorDlg
ACTIVATE DIALOG oDlg NOWAIT
RETURN (NIL)
Yes.
But close the oDbf in the valid clause but not after activate command.
This works for modal dialigs ( not nowait):
Code: Select all | Expand
ACTIVATE DIALOG oDlg
oDbf:Close()
return nil
Results in the same error as above.
WRONG
Code: Select all | Expand
ACTIVATE DIALOG oDlg NOWAIT
oDbf:Close()
return nil
Code: Select all | Expand
ACTIVATE DIALOG oDlg NOWAIT ;
VALID ( oDbf:Close(), .T. )
return nil
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Silvio.Falconi
- Posts: 7104
- Joined: Thu Oct 18, 2012 7:17 pm
Re: nowait
thanks I resolved with Cesar
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
- Silvio.Falconi
- Posts: 7104
- Joined: Thu Oct 18, 2012 7:17 pm
Re: nowait
WELCOME BACK AMONG USnageswaragunupudi wrote:Silvio.Falconi wrote:
WRONGCORRECT WAYCode: Select all | Expand
ACTIVATE DIALOG oDlg NOWAIT oDbf:Close() return nil
Code: Select all | Expand
ACTIVATE DIALOG oDlg NOWAIT ; VALID ( oDbf:Close(), .T. ) return nil
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
- Antonio Linares
- Site Admin
- Posts: 42268
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: nowait
So glad to see you here with us Dear Rao
- Silvio.Falconi
- Posts: 7104
- Joined: Thu Oct 18, 2012 7:17 pm
Re: nowait
nageswaragunupudi wrote:Silvio.Falconi wrote:
CORRECT WAYCode: Select all | Expand
ACTIVATE DIALOG oDlg NOWAIT ; VALID ( oDbf:Close(), .T. ) return nil
Nages,
I made as you wrote me
Code: Select all | Expand
ACTIVATE DIALOG oDlg NOWAIT ;
VALID ( oDbf:Close(), .T. )
it not happened with more dialog opened with same or more dbf
it happen because on xbrowse I have a small menupopup
Code: Select all | Expand
oBrw:bRClicked := {|nRow,nCol| MenuContextual(nRow,nCol,oDlg,oBrw,oArticoli) }
Code: Select all | Expand
Function MenuContextual(nRow,nCol,oDlg,oBrw,oDbf )
local oMenu
MENU oMenu POPUP 2015
MENUITEM "al primo record " +space(6)+ CHR(VK_TAB) + "Ctrl+Home";
MESSAGE "Mostra la lista dal primo record";
RESOURCE "GRID_TOP";
ACTION oBrw:KeyDown(VK_HOME, 0) WHEN oDbf:OrdKeyCount() > 0
MENUITEM "a pagina prec. " +space(6)+ CHR(VK_TAB) + "Pag. Sù";
MESSAGE "Mostra la lista della pagina precedente";
RESOURCE "GRID_PREVIOUS";
ACTION oBrw:KeyDown(VK_PRIOR, 0) WHEN oDbf:OrdKeyCount() > 0
MENUITEM "al precedente record " +space(6)+ CHR(VK_TAB) + "Indietro";
MESSAGE "Mostra la lista muovendosi al record precedente ";
RESOURCE "GRID_UP";
ACTION oBrw:KeyDown(VK_UP, 0) WHEN oDbf:OrdKeyCount() > 0
MENUITEM "avanti di un record " + CHR(VK_TAB) +space(6)+ "Avanti";
MESSAGE "Mostra la lista muovendosi al record avanti";
RESOURCE "GRID_DOWN";
ACTION oBrw:KeyDown(VK_DOWN, 0) WHEN oDbf:OrdKeyCount() > 0
MENUITEM "a pag. avanti " +space(6)+ CHR(VK_TAB) + "Pag. Giù";
MESSAGE "Mostra la lista della pagina avanti";
RESOURCE "GRID_NEXT";
ACTION oBrw:KeyDown(VK_NEXT, 0) WHEN oDbf:OrdKeyCount() > 0
MENUITEM "all'ultimo record " +space(6)+ CHR(VK_TAB) + "Ctrl+End";
MESSAGE "Mostra la lista all'ultimo record";
RESOURCE "GRID_BOTTOM";
ACTION oBrw:KeyDown(VK_END, 0) WHEN oDbf:OrdKeyCount() > 0
ENDMENU
ACTIVATE POPUP oMenu OF oDlg AT oBrw:nTop+nRow, oBrw:nLeft+nCol
return oMenu
Last edited by Silvio.Falconi on Mon Mar 13, 2023 11:45 am, edited 2 times in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
- Enrico Maria Giordano
- Posts: 8728
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: nowait
I'm happy for Rao recovery too!Antonio Linares wrote:So glad to see you here with us Dear Rao
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact: