XBrowse and nomodal dialogs

Re: XBrowse and nomodal dialogs

Postby Enrico Maria Giordano » Fri Oct 09, 2020 8: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
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: XBrowse and nomodal dialogs

Postby Enrico Maria Giordano » Fri Oct 09, 2020 9: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: Select all  Expand view
#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
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: XBrowse and nomodal dialogs

Postby cnavarro » Fri Oct 09, 2020 10:06 pm

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

Re: XBrowse and nomodal dialogs

Postby cnavarro » Fri Oct 09, 2020 10:10 pm

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

Code: Select all  Expand view

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

Re: XBrowse and nomodal dialogs

Postby Enrico Maria Giordano » Fri Oct 09, 2020 10:20 pm

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

It works! :-)

Many many thanks!

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: XBrowse and nomodal dialogs

Postby Silvio.Falconi » Sat Oct 10, 2020 8: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 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
User avatar
Silvio.Falconi
 
Posts: 6774
Joined: Thu Oct 18, 2012 7:17 pm

Re: XBrowse and nomodal dialogs

Postby James Bott » Mon Oct 12, 2020 6: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: XBrowse and nomodal dialogs

Postby Enrico Maria Giordano » Mon Oct 12, 2020 7:31 pm

Sorry, it's not my decision.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: XBrowse and nomodal dialogs

Postby Silvio.Falconi » Tue Oct 13, 2020 5: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 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
User avatar
Silvio.Falconi
 
Posts: 6774
Joined: Thu Oct 18, 2012 7:17 pm

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 99 guests