Hello Everyone,
I have a Project with several (different) instances of a same named panel in different subprojects.
With getPath i retrieve the path of the desired instance (lets assume project level 3).
If I do a RootPanelOnModule() the correct panel path is written to _UI_1.RootPanelOrigOn.FileName BUT
it is the Panel in the top Project that is loaded everytime.
Is this behavior on purpose?
Is it Possible to circumvent this behavior?
(Or do i have to come up with another solution to the problem (probably something hook functions from STDLIB- like)?)
Example:
Project
-Panels/test/panel1.pnl (Green Background)
SubProject1
--Panels/test/panel1.pnl (Yellow BG)
SubProject2
---Panels/test/panel1.pnl (Red BG)
string path = getPath(PANELS_REL_PATH,"/test/panel1.pnl",3); //Retrieves full path of panel in SubProject 2
RootPanelOnModule( path,"foo","bar","") ); //Allways opens panel wiht GREEN background
Thanks in advance, for any suggestions and comments.
Open Project from sub-Project
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Open Project from sub-Project
Hello,
when a panel is opened the UI is looking for the panel file in all project pathes beginning with the current project down to the WinCC OA installation path.
The panel is taken from the first directory where it is found.
This is the correct behaviour and there is not possibility to circumvent it.
Best Regards
Leopold Knipp
Senior Support Specialist
when a panel is opened the UI is looking for the panel file in all project pathes beginning with the current project down to the WinCC OA installation path.
The panel is taken from the first directory where it is found.
This is the correct behaviour and there is not possibility to circumvent it.
Best Regards
Leopold Knipp
Senior Support Specialist
- SudoBen
- Posts:11
- Joined: Fri Apr 08, 2011 9:25 am
Re: Open Project from sub-Project
Hy Leopold,
first of all: Thanks for the quick reply.
Ok, i will solve the matter with a mandatory namescheme for the corresponding folders.
I know that the traversal of the Subprojets this is one of the basic ideas of WOA (and its great).
But i suspected the function only to work that way if given a relative path.
You might want to consider adding the information which funcions processe a complete given path (fopen, getPath,...) and
whitch discard parts (Panel - functions).
As you give the tools to retrieve a full path to a file in a specific project level, the Panel- Functions (imho) simply don't behave in a expected way.
And this might lead to confusion :woohoo:
best regards
Benny
first of all: Thanks for the quick reply.
Ok, i will solve the matter with a mandatory namescheme for the corresponding folders.
I know that the traversal of the Subprojets this is one of the basic ideas of WOA (and its great).
But i suspected the function only to work that way if given a relative path.
You might want to consider adding the information which funcions processe a complete given path (fopen, getPath,...) and
whitch discard parts (Panel - functions).
As you give the tools to retrieve a full path to a file in a specific project level, the Panel- Functions (imho) simply don't behave in a expected way.
And this might lead to confusion :woohoo:
best regards
Benny