[Paraview] Information Only Property Parameters
Brian Panneton
brian.panneton at gmail.com
Wed Mar 23 13:55:09 EDT 2011
This XML is of two comboboxes, where the first depends on the second's
selection.
XML:
<StringVectorProperty
name="DataTypeList"
command="GetReaderDataTypeList"
information_only="1">
<StringArrayHelper />
</StringVectorProperty>
<StringVectorProperty
name="cbDataType"
command="SetReaderDataType"
immediate_update="1"
number_of_elements="1">
<StringListDomain name="operation">
<RequiredProperties>
<Property name="DataTypeList"
function="ArraySelection"/>
</RequiredProperties>
</StringListDomain>
</StringVectorProperty>
<StringVectorProperty
name="TypeList"
command="GetReaderTypeList"
information_only="1">
<StringArrayHelper />
</StringVectorProperty>
<StringVectorProperty
name="cbType"
command="SetReaderType"
immediate_update="1"
number_of_elements="1">
<StringListDomain name="operation">
<RequiredProperties>
<Property name="TypeList"
function="ArraySelection"/>
</RequiredProperties>
</StringListDomain>
</StringVectorProperty>
When a currentIndexChanged event in cbType occurs, it sends a signal to the
typeChanged() slot.
Code:
void
myclass::typeChanged()
{
this->proxy()->GetProperty("cbType")->Modified();
vtkSMProperty* prop = this->proxy()->GetProperty("DataTypeList");
this->proxy()->UpdatePropertyInformation(prop);
}
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.
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.
Any idea why that is happening?
Thanks,
Brian
On Wed, Mar 23, 2011 at 12:15 PM, Sebastien Jourdain <
sebastien.jourdain at kitware.com> wrote:
> Hi Brian,
>
> could you send the (part of) XML proxy definition and the piece of
> code you are calling to that proxy to make that push...
> So I could be sure that both side are corrects.
>
> Thanks,
>
> Seb
>
> On Wed, Mar 23, 2011 at 11:32 AM, Brian Panneton
> <brian.panneton at gmail.com> wrote:
> > Okay, my attempt to push the variable to the server using
> > immediate_update="1" seems to not update the server variable when I
> change
> > my current index of a combobox. I also tried to call Modified() on the
> > currentIndexChanged event, but it seems to ignore the changes from the
> GUI
> > and reset the combobox as if I just loaded it.
> >
> > How should I be pushing the variable to the server?
> >
> >
> > On Wed, Mar 23, 2011 at 11:11 AM, Sebastien Jourdain
> > <sebastien.jourdain at kitware.com> wrote:
> >>
> >> Unfortunately that's the way you have to do it. Or the other way is to
> >> use GatherInformation() but it won't be much better.
> >>
> >>
> >> On Wed, Mar 23, 2011 at 10:23 AM, Brian Panneton
> >> <brian.panneton at gmail.com> wrote:
> >> > If I have an information_only property with a command to get a
> >> > vtkStringArray, is there a way to pass a parameter to the fuction?
> And,
> >> > can
> >> > that parameter be from another property? Otherwise, it seems that I
> >> > would
> >> > need to push the variable to the server in order for it to be
> available
> >> > for
> >> > the command called from the information_only property.
> >> >
> >> > Thanks,
> >> > Brian Panneton
> >> >
> >> > _______________________________________________
> >> > Powered by www.kitware.com
> >> >
> >> > Visit other Kitware open-source projects at
> >> > http://www.kitware.com/opensource/opensource.html
> >> >
> >> > Please keep messages on-topic and check the ParaView Wiki at:
> >> > http://paraview.org/Wiki/ParaView
> >> >
> >> > Follow this link to subscribe/unsubscribe:
> >> > http://www.paraview.org/mailman/listinfo/paraview
> >> >
> >> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20110323/f8e2e6fa/attachment.htm>
More information about the ParaView
mailing list