FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour XBrowse and nomodal dialogs
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: XBrowse and nomodal dialogs
Posted: Fri Oct 09, 2020 08:51 PM

Please, open the same table (with different alias) in both browses. Then put, in both dialogs, a button in the buttonbar with this action

ACTION MSGINFO( FIELD -> first )

From which workarea (1 or 2) it will read the field value?

EMG

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: XBrowse and nomodal dialogs
Posted: Fri Oct 09, 2020 09:36 PM
This is a sample of one of the problems:

- click on New TAB
- click on New TAB again
- the first browser no more work (try to change the selected record)

Code (fw): Select all Collapse
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oWnd

    DEFINE WINDOW oWnd

    DEFINE BUTTONBAR SIZE 80, 40 OF oWnd 2007

    DEFINE BUTTON;
           OF oWnd:oBar;
           PROMPT "New TAB" CENTER;
           ACTION CREATEBRW()

    ACTIVATE WINDOW oWnd

    RETURN NIL


STATIC FUNCTION CREATEBRW()

    LOCAL oDlg, oBrw

    USE CUSTOMER ALIAS ( CGETNEWALIAS() ) SHARED

    DEFINE DIALOG oDlg

    @ 0, 0 XBROWSE oBrw ALIAS ALIAS()

    oBrw:CreateFromCode()

    ACTIVATE DIALOG oDlg;
             ON INIT oBrw:AdjClient();
             VALID ( DBCLOSEAREA( oBrw:cAlias ), .T. );
             NOMODAL

    RETURN NIL


EMG
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: XBrowse and nomodal dialogs
Posted: Fri Oct 09, 2020 10:06 PM
Please look my sample

( Now I will test your example. )

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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: XBrowse and nomodal dialogs
Posted: Fri Oct 09, 2020 10:10 PM
Enrico, I tested your sample
Please use clause NEW when you Open dbf

Code (fw): Select all Collapse
    USE CUSTOMER NEW ALIAS ( CGETNEWALIAS() ) SHARED
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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: XBrowse and nomodal dialogs
Posted: Fri Oct 09, 2020 10:20 PM

Ok, I made a newbie mistake... :-(

It works! :-)

Many many thanks!

EMG

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: XBrowse and nomodal dialogs
Posted: Sat Oct 10, 2020 08:21 AM

you are newbie ?
and since when are you a newbie?
I really tried to understand and until you created the test sample I kept understanding that what I understood was not the problem you said you had because I really didn't think I could make a beginner mistake, I didn't believe it possible and now that you have made us share in your mistake I still do not believe it !!!

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: XBrowse and nomodal dialogs
Posted: Mon Oct 12, 2020 06:45 PM

You can also avoid these kinds of problems by using database objects. Every database object creates its own unique workarea and handles it internally. Thus you never have to deal with workareas.

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: XBrowse and nomodal dialogs
Posted: Mon Oct 12, 2020 07:31 PM

Sorry, it's not my decision.

EMG

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: XBrowse and nomodal dialogs
Posted: Tue Oct 13, 2020 05:02 PM
Enrico Maria Giordano wrote:Sorry, it's not my decision.

EMG


I not understood, explain us
I don't want to advertise because James Bott doesn't need it but system 'Bott is usefull, although I have not yet understood all the possibilities,
for example for a Daniel Garcia class ( tplan) there are big problems, but for all prg (do for example or a billing and accounting system)
it is an excellent system, then of course there are limitations but since it is a class ( from nother) the limitations come from the parent class
there are many people who use it without problems
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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

Continue the discussion