Page 2 of 2
Re: XBrowse and nomodal dialogs
Posted: Fri Oct 09, 2020 8:51 pm
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
Re: XBrowse and nomodal dialogs
Posted: Fri Oct 09, 2020 9:36 pm
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
Re: XBrowse and nomodal dialogs
Posted: Fri Oct 09, 2020 10:06 pm
by cnavarro
Please look my sample
( Now I will test your example. )
Re: XBrowse and nomodal dialogs
Posted: Fri Oct 09, 2020 10:10 pm
by cnavarro
Enrico, I tested your sample
Please use clause NEW when you Open dbf
Code: Select all
USE CUSTOMER NEW ALIAS ( CGETNEWALIAS() ) SHARED
Re: XBrowse and nomodal dialogs
Posted: Fri Oct 09, 2020 10:20 pm
by Enrico Maria Giordano
Ok, I made a newbie mistake...
It works!
Many many thanks!
EMG
Re: XBrowse and nomodal dialogs
Posted: Sat Oct 10, 2020 8:21 am
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 !!!
Re: XBrowse and nomodal dialogs
Posted: Mon Oct 12, 2020 6:45 pm
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.
Re: XBrowse and nomodal dialogs
Posted: Mon Oct 12, 2020 7:31 pm
by Enrico Maria Giordano
Sorry, it's not my decision.
EMG
Re: XBrowse and nomodal dialogs
Posted: Tue Oct 13, 2020 5:02 pm
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