theierm
2nd December 2010, 15:39
I have main 3gl session with some graphical parts. By dubble click on some object the new subsession is activated (with wait.and.activate function). This subsession is 3gl with graphical parts, too (it is subsession for selecting a new color for object). Everything works OK with one exception - when i close subsession (by pressing cross sing in upper right corner of subsession window) then main session is closed, too. When i call from main session any standard 4gl subsession, then clossing this subsession does not effect on main session. Why this is not working for my 3gl subsession? Any ideas? Thanks
NPRao
2nd December 2010, 23:01
You might be having issues with Process Groups.
Refer to -
Process groups overview (http://www.baanboard.com/programmers_manual_baanerp_help_functions_process_groups_overview)
Processes, process groups, and main windows (http://www.baanboard.com/programmers_manual_baanerp_help_multitasking_processes_process_groups_and_main_windows)
george7a
3rd December 2010, 09:12
The links that NPRao posted should help.
If you still have problems, please post your code.
theierm
3rd December 2010, 13:53
I played with process group and grab.window and etc. - without success. I found some workaround - do not allowed to close subsession with standard cross sign (create special button for clossing) - i am not very lucky with it.
I attached two scripts - main session sdanpplan00011 and subsession sdanpplans0011 - i would be very grateful if you can check it.
george7a
3rd December 2010, 14:25
Your working script is attached. Enjoy ;)
By the way, search in the forum for how to select a color, there is a Baanish way to do so.
theierm
3rd December 2010, 14:46
Thanks a lot for your quick answer,
the subsession closing OK - the main session stay alived. But after return to main session, the event handler does not work - if i double pressed again the object, the subsession is not activated. Should i change anything in main session too?
george7a
3rd December 2010, 14:49
Probably, yes. As you can see, I used this function:
http://www.baanboard.com/programmers_manual_baanerp_help_functions_process_groups_set_pgrp
But since I saw that you are trying to choose colors, I suggested you search in the forum for how to do it. Let me know if you couldn't find any..
george7a
3rd December 2010, 14:53
Check this link, if you want to know how to select a color :
http://www.baanboard.com/baanboard/showthread.php?p=132419&highlight=color#post132419
It is a part of the Undocumented Functions & Variables (http://www.baanboard.com/baanboard/showthread.php?t=36550) Thread.
theierm
3rd December 2010, 15:09
This color selection is only example. The main idea is to have main session and from there activate some special subsession, where i can change all properties which selected object has (the color is only one of them).
I see, that you used set.prgp(pid, pid). I think, that this way, the subsession losts connection to main session. I am looking for the solution which works the same way as for example zoom.to$ function for 4gl session.
By the way, thanks for you effort again.