Interestingly enough, there is an uncompile() method specified in the
JMeterComponentModel interface.  This method is called on all the elements
in the tree before a test is run.  It is there as a way to reset the
components between test runs.  You could try putting your code in this
method.

-Mike

> -----Original Message-----
> From: Varghese, Amith [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 25, 2001 1:36 PM
> To: '[EMAIL PROTECTED]'
> Subject: initialization of custom config element
> 
> 
> I am trying to write a custom config element and I was 
> wondering if there is
> a way to initialize the config element when the user tries to 
> run the test
> plan.  The problem that I am having is that my config element 
> accepts a file
> name which it uses to read data from.  When I save the config 
> element it
> saves the location of the file name successfully to the .jmx 
> file.  However,
> when I restore the config element, it does not re-read the 
> file I specified
> unless i change the GUI (because of the way the code is 
> written).  Is there
> some sort of compile method that acts as initilization before 
> the config
> element is used?  Because then I would like to change it so 
> that the file is
> read once the user tries to run the test plan, rather then 
> when the GUI is
> changed.
> 
> I've also noticed a similar problem in ResultCollector (the 
> view results
> listener).  If you add the listener to the test plan then 
> save it and then
> restore it again,  you must click on the listener so that it 
> can initialize
> the results array list.  Otherwise you get a 
> NullPointerException.  It would
> be nice if there is some way to initialize this without 
> having to click on
> the element.
> 
> If anyone could help me out, I would appreciate it.
> 
> Thanks
> Amith
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to