Hi,
I would like to receive an event after the initializing of all objects contained in a panel, to
call a function after this initialiaze.
How can I do it
regards
Emmanuel
How can receive an event at the end of panel initialize?
- eMichx
- Posts:64
- Joined: Thu Apr 24, 2014 11:24 am
How can receive an event at the end of panel initialize?
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: How can receive an event at the end of panel initialize?
Hello,
there is no event available which can be called when all objects are initialized.
Can you please describe more detailed what you want to realize.
Which function shall be called when the objects are initialized?
Best Regards
Leopold Knipp
Senior Support Specialist
there is no event available which can be called when all objects are initialized.
Can you please describe more detailed what you want to realize.
Which function shall be called when the objects are initialized?
Best Regards
Leopold Knipp
Senior Support Specialist
- eMichx
- Posts:64
- Joined: Thu Apr 24, 2014 11:24 am
Re: How can receive an event at the end of panel initialize?
Hi,
We have implemented an electric distribution based on DP excitement. But it works when all
DP are connected ( init phase).
I have added a delay at the initialization, but I would prefer to trapped the moment when the
objects are initialized.
regards
Emmanuel
We have implemented an electric distribution based on DP excitement. But it works when all
DP are connected ( init phase).
I have added a delay at the initialization, but I would prefer to trapped the moment when the
objects are initialized.
regards
Emmanuel
- fmulder
- Posts:330
- Joined: Wed Feb 03, 2010 9:46 am
Re: How can receive an event at the end of panel initialize?
You could do the following (I've used this in the past to test the performance of a panel)
* You clear a global variable before opening the panel
* Every symbol writes an ID in this global variable (used a dyn_string, or use a mapping var)
* The code in your main panel must start a athread that checks for the right amount of entries in this global array
It is not the nicest solution but should work.
I've used this in the past:
* Make a dyn_time
* Record the current time dynAppend( tPerformance, getCurrentTime() );
* Open the panel you'd like to test
* Let every shape add the current time to this array dynAppend( tPerformance, getCurrentTime() );
* Do a short delay
* Now look at the 'oldest' and the 'newest' time
* This will give you the (rough) loading time of a panel
Good luck
p.s.
In my timing example, I do not need to know the number of objects. You have an extra challenge !
Frenk
* You clear a global variable before opening the panel
* Every symbol writes an ID in this global variable (used a dyn_string, or use a mapping var)
* The code in your main panel must start a athread that checks for the right amount of entries in this global array
It is not the nicest solution but should work.
I've used this in the past:
* Make a dyn_time
* Record the current time dynAppend( tPerformance, getCurrentTime() );
* Open the panel you'd like to test
* Let every shape add the current time to this array dynAppend( tPerformance, getCurrentTime() );
* Do a short delay
* Now look at the 'oldest' and the 'newest' time
* This will give you the (rough) loading time of a panel
Good luck
p.s.
In my timing example, I do not need to know the number of objects. You have an extra challenge !
Frenk
- eMichx
- Posts:64
- Joined: Thu Apr 24, 2014 11:24 am
Re: How can receive an event at the end of panel initialize?
Hi Frenk,
To update the array, do I need to control its access with a mutex (synchonized?)
If I use a mutex, it will create a bottleneck? and the performances will be decreased?
regards
Emmanuel
To update the array, do I need to control its access with a mutex (synchonized?)
If I use a mutex, it will create a bottleneck? and the performances will be decreased?
regards
Emmanuel
- fmulder
- Posts:330
- Joined: Wed Feb 03, 2010 9:46 am
Re: How can receive an event at the end of panel initialize?
No. If you use dynAppend(myArray, getCurrentTime() ) then there us no need to use a mutex. You can assume the dynAppend() to be threadsafe
Good luck
Good luck