<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; "><div>Hi Utkarsh,</div><div><br></div><div>Thanks for the reply! I thought I was doing it in the correct spot… I do preserve the user selections, but what was getting me is that, when restoring state, Paraview is calling my "enableArray()" routine before RequestInformation() is ever called. The result was that my array list was being force-populated by the state restoration rather than waiting for my reader to build the array list from the input file. This caused all kinds of headaches from having double entries in the list, to requesting garbage if my reader had changed slightly. My interim fix is to just check, when I am populating the arrays for the first time, to see if the array already exists, and if so, to leave it alone. I don't think this is a perfect solution, as I would think that paraview should wait until after RequestInformation() is called before trying to set the state of the arrays.</div><div><br></div><div>Anyway, I have it working in the meantime. Thanks for you response!</div><div><br></div><div>-Josh</div><div><br></div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> Utkarsh Ayachit <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>><br><span style="font-weight:bold">Date: </span> Wednesday, February 20, 2013 10:25 AM<br><span style="font-weight:bold">To: </span> Joshua Murphy <<a href="mailto:joshua.murphy@lasp.colorado.edu">joshua.murphy@lasp.colorado.edu</a>><br><span style="font-weight:bold">Cc: </span> "<a href="mailto:paraview-developers@paraview.org">paraview-developers@paraview.org</a>" <<a href="mailto:paraview-developers@paraview.org">paraview-developers@paraview.org</a>><br><span style="font-weight:bold">Subject: </span> Re: [Paraview-developers] where in reader is best place to initialize data arrays?...<br></div><div><br></div><div><div><div dir="ltr"><div class="gmail_extra">You surely should be populating your list of arrays in RequestInformation(), but you may want to always preserve what the user chose. The way you have it setup, the user-choice of arrays will be cleared anytime RequestInformation()
gets called and that method can get called for several reasons during the lifetime of the reader.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Utkarsh<br><br><div class="gmail_quote">On Tue, Feb 19, 2013 at 9:07 PM, Joshua Murphy <span dir="ltr">
<<a href="mailto:Joshua.Murphy@lasp.colorado.edu" target="_blank">Joshua.Murphy@lasp.colorado.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word"><div>Hello,</div><div><br></div><div>Hopefully this can be answered quickly by someone in the know…</div><div><br></div><div>I am tracking down a restore state bug in my reader, and I have nailed it down to the following situation:</div><div><br></div><div>When restoring state, ParaView is using my setArrayStatus() function before I have finished initializing my array list within RequestInformation().</div><div><br></div><div>This causes the on/off status of the arrays in the state being restored to be ignored, as I clobber them when I initialize the list.</div><div><br></div><div>My question is this: where should I be populating my list of available arrays if not in RequestInformation()? The way I have it set up now works fine for when I load data from scratch, but when restoring from a state, as I said, ParaView is trying to
set the on/off state of the arrays before I am done populating the available arrays…</div><div><br></div><div><br></div><div>I hope someone can give me a quick answer… again the question boils down to this: where, and at what point, should I be populating my available array list so that it will be initialized already when ParaView attempts to change the status during a state
restore?</div><div><br></div><div>Thanks,</div><div>Josh</div><div> </div></div><br>
_______________________________________________<br>
Paraview-developers mailing list<br><a href="mailto:Paraview-developers@paraview.org">Paraview-developers@paraview.org</a><br><a href="http://public.kitware.com/mailman/listinfo/paraview-developers" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br><br></blockquote></div><br></div></div></div></div></span></body></html>