This XML is of two comboboxes, where the first depends on the second's selection.<br>XML:<br> <StringVectorProperty <br> name="DataTypeList"<br> command="GetReaderDataTypeList"<br>
information_only="1"><br> <StringArrayHelper /><br> </StringVectorProperty><br> <StringVectorProperty <br> name="cbDataType"<br>
command="SetReaderDataType"<br> immediate_update="1"<br> number_of_elements="1"><br> <StringListDomain name="operation"><br>
<RequiredProperties><br> <Property name="DataTypeList" <br> function="ArraySelection"/><br> </RequiredProperties><br>
</StringListDomain><br> </StringVectorProperty><br><br> <StringVectorProperty <br> name="TypeList"<br> command="GetReaderTypeList"<br>
information_only="1"><br> <StringArrayHelper /><br> </StringVectorProperty><br> <StringVectorProperty <br> name="cbType"<br>
command="SetReaderType"<br> immediate_update="1"<br> number_of_elements="1"><br> <StringListDomain name="operation"><br>
<RequiredProperties><br> <Property name="TypeList" <br> function="ArraySelection"/><br> </RequiredProperties><br>
</StringListDomain><br> </StringVectorProperty><br><br><br>When a currentIndexChanged event in cbType occurs, it sends a signal to the typeChanged() slot.<br><br>Code:<br>void<br>myclass::typeChanged()<br>
{<br> this->proxy()->GetProperty("cbType")->Modified();<br> vtkSMProperty* prop = this->proxy()->GetProperty("DataTypeList");<br> this->proxy()->UpdatePropertyInformation(prop);<br>
}<br><br>What ends up happening is that when I change the combobox for cbType from index 1 to index 2, typeChanged() is called, but is sending the 1st value to SetReaderType. It looks like it refeshes but remains index1. Thus, the DataTypeList is populated with the same information it had.<br>
<br>When I remove the Modified() line, the combobox for cbType will show the change from index 1 to index 2, but SetReaderType does not get called.<br><br>Any idea why that is happening?<br><br>Thanks,<br><br>Brian<br><br>
<br><div class="gmail_quote">On Wed, Mar 23, 2011 at 12:15 PM, Sebastien Jourdain <span dir="ltr"><<a href="mailto:sebastien.jourdain@kitware.com">sebastien.jourdain@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Brian,<br>
<br>
could you send the (part of) XML proxy definition and the piece of<br>
code you are calling to that proxy to make that push...<br>
So I could be sure that both side are corrects.<br>
<br>
Thanks,<br>
<br>
Seb<br>
<br>
On Wed, Mar 23, 2011 at 11:32 AM, Brian Panneton<br>
<div><div></div><div class="h5"><<a href="mailto:brian.panneton@gmail.com">brian.panneton@gmail.com</a>> wrote:<br>
> Okay, my attempt to push the variable to the server using<br>
> immediate_update="1" seems to not update the server variable when I change<br>
> my current index of a combobox. I also tried to call Modified() on the<br>
> currentIndexChanged event, but it seems to ignore the changes from the GUI<br>
> and reset the combobox as if I just loaded it.<br>
><br>
> How should I be pushing the variable to the server?<br>
><br>
><br>
> On Wed, Mar 23, 2011 at 11:11 AM, Sebastien Jourdain<br>
> <<a href="mailto:sebastien.jourdain@kitware.com">sebastien.jourdain@kitware.com</a>> wrote:<br>
>><br>
>> Unfortunately that's the way you have to do it. Or the other way is to<br>
>> use GatherInformation() but it won't be much better.<br>
>><br>
>><br>
>> On Wed, Mar 23, 2011 at 10:23 AM, Brian Panneton<br>
>> <<a href="mailto:brian.panneton@gmail.com">brian.panneton@gmail.com</a>> wrote:<br>
>> > If I have an information_only property with a command to get a<br>
>> > vtkStringArray, is there a way to pass a parameter to the fuction? And,<br>
>> > can<br>
>> > that parameter be from another property? Otherwise, it seems that I<br>
>> > would<br>
>> > need to push the variable to the server in order for it to be available<br>
>> > for<br>
>> > the command called from the information_only property.<br>
>> ><br>
>> > Thanks,<br>
>> > Brian Panneton<br>
>> ><br>
>> > _______________________________________________<br>
>> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>> ><br>
>> > Visit other Kitware open-source projects at<br>
>> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>> ><br>
>> > Please keep messages on-topic and check the ParaView Wiki at:<br>
>> > <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
>> ><br>
>> > Follow this link to subscribe/unsubscribe:<br>
>> > <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
>> ><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br>