|
| Iniciado por guest, 10,may. 2016 10:15 - 4 respuestas |
| |
| | | |
|
| |
| Publicado el 10,mayo 2016 - 10:15 |
Hi,
in WinDev v20 :
Usually I dont like to use the black box software PCS supplies, but I`m in a hurry and have not done any groupware classes so far, so I`ve implemented the manual groupware.
I Made 2 users, one supervisor and one standard-user.
The standard user is not allowed to access a certain window.
But when I (as the standard-user) try to access the not-allowed window, my app chrashes with a error code 10019 - You have no rights to access the Win_Mywin.
I do not want to crash my application, merely give a warning of type "You are not allowed to do this, contact your supervisor" or something. (Is it common to crash the app if no user-rights?)
So I trap the give exception with the following project code: WHEN EXCEPTION IF ExceptionInfo(errCode) = 10019 THEN Error("Not allowed. ") ExceptionEnable() END EXCEPTION END But my calling window is hided/invisible and not to be found again?
A advice on this would be highly appreciated, as I guess I`m doing something wrong 
Cheers Tor-Bjarne |
| |
| |
| | | |
|
| | |
| |
| Publicado el 10,mayo 2016 - 10:35 |
Hi Tor-Bjarne,
just make the menu-option / button for opening that window gray or invisible! Do not tinker with the window itself! Gray is the better solution - if you have several options in your program then the menu items shift with invisible menue items. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 10,mayo 2016 - 11:54 |
Hi Guenter,
Thank you for your reply.
Yes, a good idea, but I don`t know what the "Supervisor" at my customer site do.
Me-myself and Irene can just disable the Groupware if we want 
And where are windows not on any options as in this case, it`s pop-up window that pops-up it a user press on the "Tare-Weight" entry in a list.
Cheers Tor-Bjarne |
| |
| |
| | | |
|
| | |
| |
| Publicado el 10,mayo 2016 - 12:47 |
Tor-Bjarne,
in such cases I add an button to the window i.e. "show tare-weight". place this button outside the visible window so the user does not see it. and place your popupcode behind this button Finally use ExecuteProcess(btn_tareweight,trtClick) at the point where your current code is coming from. Then you have the ability to use the groupware for situations where you do not have a regular control to start an action. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 10,mayo 2016 - 14:32 |
Hi Arie,
Thank you for your reply 
Yes that could do, in this case that served as one example
I also have to document to the "supervisor" that it`s vital that the invisible Button(s) he have to restrict access to, not the "Change tare" "Change net" "Change Trolley no" type of window(s).
Then I have to hope that the "supervisor(s)" on the deployed site actually do that and not what`s natural for him (restrict the whole window)
I don`t actually see a problem with my system as long as I`m using it (I know I cant press or restrict the "Tare change" as system gets halted)
My "FlyFish" system start several weighing processes depending on what terminal the user is on and what type of tare is to be calculated (Trolleys, ULDs, Pallets and so forth.)
Now: If the "Supervisor" do a honest mistake (Restricting the window and not the invisible button,) the weight process terminates and have to be started all over, since this process go around the clock and the "supervisor" is available at office hours I can Image this is to be a problem.
If however, after a error the process picket up again the "supervisors" can restrict whatever he wants as the option/window is restricted not halting the program.
So my question is still how can I trap the 10019 error and continue running the system 
Cheers Tor-Bjarne |
| |
| |
| | | |
|
| | | | |
| | |
|