XBrowse and nomodal dialogs

User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
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: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
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

#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: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: XBrowse and nomodal dialogs

Post by cnavarro »

Please look my sample

( Now I will test your example. )

Image
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: XBrowse and nomodal dialogs

Post by cnavarro »

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

Code: Select all

    USE CUSTOMER NEW ALIAS ( CGETNEWALIAS() ) SHARED
 
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

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 !!!
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
James Bott
Posts: 4654
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: 4956
Joined: Thu Oct 18, 2012 7:17 pm

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
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Post Reply