XBrowse and nomodal dialogs
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
XBrowse and nomodal dialogs
I'm having strange problems with XBrowse and nomodal dialogs. Switching from one dialog to another, often I find 0 (zero) as the current workarea. What is the correct way to manage workarea switching in such scenario? I'm currently using oBrw:bGotFocus but it seems that other XBrowse functions are executed before it, so the workarea is not correctly switched.
Any help?
EMG
Any help?
EMG
Re: XBrowse and nomodal dialogs
Enrico, have you tried with oDlg:bGotFocus = { || dbSelectArea( "dbffile" )} .
Best regards
Otto
Best regards
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: XBrowse and nomodal dialogs
Yes, same problem. oDlg:bGotFocus doesn't start at all.
EMG
EMG
Re: XBrowse and nomodal dialogs
And try with ?
Code: Select all
oBrw:bpainted = { || dbSelectArea( "dbffile" )}
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: XBrowse and nomodal dialogs
Sorry, it doesn't solve the problem. There are some codeblocks in XBrowse that are evaluated before bPainted and bGotFocus, so before workarea setting.
EMG
EMG
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: XBrowse and nomodal dialogs
Is there any code in XBrowse that changes the current workarea? Otherwise, who is that selects the workarea number zero? I don't do it for sure.
EMG
EMG
Re: XBrowse and nomodal dialogs
Dear Enrico,
I'm so sorry to ask you.
Do you add "ALIAS" in XBROWSE command? If not, I guess the XBROWSE will read from current workarea.
I'm so sorry to ask you.
Do you add "ALIAS" in XBROWSE command? If not, I guess the XBROWSE will read from current workarea.
Regards,
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: XBrowse and nomodal dialogs
Yes, I already add
ALIAS ALIAS()
Is it correct? But the problem is that the workarea become number zero when I switch to another dialog with another XBrowse.
EMG
ALIAS ALIAS()
Is it correct? But the problem is that the workarea become number zero when I switch to another dialog with another XBrowse.
EMG
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: XBrowse and nomodal dialogs
I assume you are using different workareas for different browses. We can not use same workarea in different xbrowses.
Switching the xbrowses does not switch workareas (does not change the selected workarea).
XBrowse is also not affected by the currently selected workarea.
XBrowse reads from oBrw:cAlias and writes to oBrw:cAlias.
Switching the xbrowses does not switch workareas (does not change the selected workarea).
XBrowse is also not affected by the currently selected workarea.
XBrowse reads from oBrw:cAlias and writes to oBrw:cAlias.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: XBrowse and nomodal dialogs
Yes, I'm using different workareas. But the browses are dinamically created so I can't use any alias, I need that the current workarea is the one of the browse with the focus.
Can it be done?
EMG
Can it be done?
EMG
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: XBrowse and nomodal dialogs
Can be done, as long as you programmatically ensure that you are not creating a new Xbrowse for the same alias for which you already created another Xbrowse.Can it be done?
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: XBrowse and nomodal dialogs
Yes, I'm sure of that because the aliases are generated by the program. So, what do you suggest for switching the workarea on focus change? Please note that bGotFocus seems not to be enough.
EMG
EMG
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: XBrowse and nomodal dialogs
There is no need to switch workareas.
XBrowse has nothing to do with currently selected workarea.
If you still have any problem, please provide a small sample.
XBrowse has nothing to do with currently selected workarea.
If you still have any problem, please provide a small sample.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: XBrowse and nomodal dialogs
Scenario: two nomodal dialogs (or windows) each with its own browse. The code behind them are the same and relies on the current workarea (this is not my choice). How can I get this working without a way to automatically switch the workarea when a dialog gains the focus?
EMG
EMG
Re: XBrowse and nomodal dialogs
Dear Enrico
I do not think I fully understand the problem that it raises. Can you better explain to me what you need
Here are two non-modal dialogs with xbrowse
I do not think I fully understand the problem that it raises. Can you better explain to me what you need
Here are two non-modal dialogs with xbrowse
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.
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.