XBrowse and nomodal dialogs

User avatar
Enrico Maria Giordano
Posts: 8770
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 7 times
Contact:

Re: XBrowse and nomodal dialogs

Post by Enrico Maria Giordano »

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
User avatar
Enrico Maria Giordano
Posts: 8770
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 7 times
Contact:

Re: XBrowse and nomodal dialogs

Post by Enrico Maria Giordano »

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: Select all | Expand

#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
User avatar
cnavarro
Posts: 6572
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Has thanked: 4 times
Been thanked: 6 times

Re: XBrowse and nomodal dialogs

Post by cnavarro »

Please look my sample

( Now I will test your example. )

Image
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: 6572
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Has thanked: 4 times
Been thanked: 6 times

Re: XBrowse and nomodal dialogs

Post by cnavarro »

Enrico, I tested your sample
Please use clause NEW when you Open dbf

Code: Select all | Expand


    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
User avatar
Enrico Maria Giordano
Posts: 8770
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 7 times
Contact:

Re: XBrowse and nomodal dialogs

Post by Enrico Maria Giordano »

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

It works! :-)

Many many thanks!

EMG
User avatar
Silvio.Falconi
Posts: 7187
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 9 times

Re: XBrowse and nomodal dialogs

Post by Silvio.Falconi »

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
User avatar
James Bott
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: XBrowse and nomodal dialogs

Post by James Bott »

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
User avatar
Silvio.Falconi
Posts: 7187
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 9 times

Re: XBrowse and nomodal dialogs

Post by Silvio.Falconi »

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
Post Reply