I was able to get it working by using SetElement and setting the currentText retreived from the widget. Then I called UpdateProperty on the first combobox. Next I called UpdatePropertyInformation on the second combobox. For the order issue, I just ended up renaming them so they followed the order I needed.<br>
<br>Thanks,<br>Brian Panneton<br><br><div class="gmail_quote">On Thu, Mar 24, 2011 at 9:47 AM, 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>
I'm not sure to understand your UI and the way the things are.<br>
It might be overkill, but if you want to express those dependency, you<br>
can create your own domain based on what it is filled so far so at<br>
start only TypeList will be available, then "TypeList + DataTypeList"<br>
and then "TypeList + DataTypeList + DataList"<br>
Other than that, I don't know if it is possible to change the order...<br>
<br>
Seb<br>
<br>
<br>
On Thu, Mar 24, 2011 at 9: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>
> I will attempt that and see if it corrects the issue. I have also noticed<br>
> that when I start up the plugin and open a file, the order of my combobox<br>
> population is wrong, and I can't seem to be able to change it.<br>
><br>
> On load, I want it to populate in this order: TypeList, DataTypeList,<br>
> DataList<br>
> But it seems to always go in alphabetical order. This causes an issue<br>
> because DataList depends on what is selected in DataTypeList which depends<br>
> on TypeList. If either DataList or DataTypeList is run first it defaults to<br>
> none.<br>
><br>
> Is there a way to make them load data in order?<br>
><br>
> On Wed, Mar 23, 2011 at 2:23 PM, Sebastien Jourdain<br>
> <<a href="mailto:sebastien.jourdain@kitware.com">sebastien.jourdain@kitware.com</a>> wrote:<br>
>><br>
>> Who is supposed to change the property cbType ?<br>
>> I bet it get updated after that call, therefore, you should update<br>
>> with the correct value before you update the information property.<br>
>> To make sure you get the right value, print the combobox value so you<br>
>> know which value is pushed to the server before the update information<br>
>> property.<br>
>><br>
>> Seb<br>
>><br>
>> did you tried to print the combobox index when the slot get called ?<br>
>> Another thing could be to set yourself the value in the property at that<br>
>> time.<br>
>><br>
>> On Wed, Mar 23, 2011 at 1:55 PM, Brian Panneton<br>
>> <<a href="mailto:brian.panneton@gmail.com">brian.panneton@gmail.com</a>> wrote:<br>
>> > This XML is of two comboboxes, where the first depends on the second's<br>
>> > 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<br>
>> > the<br>
>> > 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<br>
>> > from<br>
>> > index 1 to index 2, typeChanged() is called, but is sending the 1st<br>
>> > value to<br>
>> > SetReaderType. It looks like it refeshes but remains index1. Thus, the<br>
>> > DataTypeList is populated with the same information it had.<br>
>> ><br>
>> > When I remove the Modified() line, the combobox for cbType will show the<br>
>> > 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>
>> > On Wed, Mar 23, 2011 at 12:15 PM, Sebastien Jourdain<br>
>> > <<a href="mailto:sebastien.jourdain@kitware.com">sebastien.jourdain@kitware.com</a>> wrote:<br>
>> >><br>
>> >> 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>
>> >> <<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<br>
>> >> > change<br>
>> >> > my current index of a combobox. I also tried to call Modified() on<br>
>> >> > the<br>
>> >> > currentIndexChanged event, but it seems to ignore the changes from<br>
>> >> > the<br>
>> >> > 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<br>
>> >> >> 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?<br>
>> >> >> > And,<br>
>> >> >> > can<br>
>> >> >> > that parameter be from another property? Otherwise, it seems that<br>
>> >> >> > I<br>
>> >> >> > would<br>
>> >> >> > need to push the variable to the server in order for it to be<br>
>> >> >> > 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>
>> ><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br>