Menu actions
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Antonio,
Call this function don't solve problem. In several places program show important data for user and should by wait for end user actions. In other situation window contents is dependent of other window and I must to know when second window is closed and do action eg. refresh objects in first window etc. Where we have little big project with many windows and many objects like browse, say, get, button and other is there little problem to multiple pass parameters to function where window is activate.
Comma separated commands with modal-only window were is the best programming solution in FWPPC. Program code were simple and forceful.
Thanks
Pawel
Call this function don't solve problem. In several places program show important data for user and should by wait for end user actions. In other situation window contents is dependent of other window and I must to know when second window is closed and do action eg. refresh objects in first window etc. Where we have little big project with many windows and many objects like browse, say, get, button and other is there little problem to multiple pass parameters to function where window is activate.
Comma separated commands with modal-only window were is the best programming solution in FWPPC. Program code were simple and forceful.
Thanks
Pawel
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Antonio,
After change this code only first call create second window. Message is show after close main window. I check process in PPC environment and when main window is closed program process still running.
When I change this in Window.Prg:
it's look like windows is really modal now (windows and process is properly created and closed).
Thanks for help
Pawel
Sample code:
After change this code only first call create second window. Message is show after close main window. I check process in PPC environment and when main window is closed program process still running.
When I change this in Window.Prg:
Code: Select all
if Self == oWndMain
oWndMain = nil
// PostQuitMessage( 0 )
endif
PostQuitMessage( 0 )
Thanks for help
Pawel
Sample code:
Code: Select all
Function TestWnd1 ()
Local oWnd := Nil
Define Window oWnd Title 'Window 1'
@ 50, 50 Button 'Window 2' Size 100, 20 Pixel Action TestWnd2 ()
Activate Window oWnd
Return .T.
Function TestWnd2 ()
Local oWnd := Nil
Define Window oWnd Title 'Window 2'
Activate Window oWnd
MsgInfo ('Window closed')
Return .T.
Antonio,
If there changes for window.prg is valid please update command for activate window eg. add clause modal (activate window wnd modal).
Thanks for help
Pawel
Changes for window.prg
If there changes for window.prg is valid please update command for activate window eg. add clause modal (activate window wnd modal).
Thanks for help
Pawel
Changes for window.prg
Code: Select all
if Self == oWndMain .Or. ::lModal
WinRun()
endif
if Self == oWndMain
oWndMain = nil
PostQuitMessage( 0 )
else
if ::lModal
PostQuitMessage( 0 )
endif
endif
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Antonio,
Finally I change window.prg as is:
Regards
Pawel
Finally I change window.prg as is:
Code: Select all
if Self == oWndMain
oWndMain = nil
PostQuitMessage( 0 )
else
if ::lModal .And. ::ClassName() == "TWINDOW"
PostQuitMessage( 0 )
endif
endif
Pawel
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Antonio,
This is finally construct for today (modal window with TFolder object doesn't executing clause after window close):
Regards
Pawel
This is finally construct for today (modal window with TFolder object doesn't executing clause after window close):
Code: Select all
if ::lModal .And. ::ClassName() $ "TFOLDER;TWINDOW"
PostQuitMessage( 0 )
endif
Pawel
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact: