[Paraview] QListWidget Selection Issue

Brian Panneton brian.panneton at gmail.com
Fri Mar 25 11:31:56 EDT 2011


I have changed the XML to look as such:
[code]
            <StringVectorProperty
                name="w3_DataList"
                information_only="1">
                <ArraySelectionInformationHelper attribute_name="Data" />
            </StringVectorProperty>
            <StringVectorProperty
                name="w3_lbData"
                command="SetDataArrayStatus"
                number_of_elements="0"
                repeate_command="1"
                number_of_elements_per_command="2"
                element_types="2 0">
                <ArraySelectionDomain name="array_list">
                    <RequiredProperties>
                        <Property name="w3_DataList"
                            function="ArrayList"/>
                    </RequiredProperties>
                </ArraySelectionDomain>
            </StringVectorProperty>
[/code]

This seems to be more of what I need. I also implemented the following
functions:
[code]
    int GetNumberOfDataArrays();
    const char* GetDataArrayName(int index);
    int GetDataArrayStatus(const char* name);
    void SetDataArrayStatus(const char* name, int status);
[/code]

When my reader loads the file, I still get the error:
     "had to make up a value for selection"

Also, when I call accept(), I get this message which I am confused why
argument 3 is a string.
[error]
could not find requested method: "SetDataArrayStatus"
or the method was called with incorrect arguments.

while processing
Message 0 = Invoke
  Argument 0 = id_value {143}
  Argument 1 = string_value {SetDataArrayStatus}
  Argument 2 = string_value {Something}
  Argument 3 = string_value {1}
[/error]

Could this be due to using a QListWidget? If so, what should I be using?

Thanks,
Brian Panneton


On Thu, Mar 24, 2011 at 4:02 PM, Brian Panneton <brian.panneton at gmail.com>wrote:

> I have a QListWidget that is being filled by the following XML:
>
>            <StringVectorProperty
>                 name="w3_DataList"
>                 command="GetReaderDataList"
>                 information_only="1">
>                 <StringArrayHelper />
>             </StringVectorProperty>
>             <StringVectorProperty
>                 name="w3_lbData"
>                 immediate_update="1"
>                 number_of_elements="0"
>                 repeat_command="1"
>                 number_of_elements_per_command="2"
>                 element_types="2 0"
>                 command="SetReaderData">
>                 <ArraySelectionDomain name="operation">
>                     <RequiredProperties>
>                         <Property name="w3_DataList"
>                             function="ArrayList"/>
>                     </RequiredProperties>
>                 </ArraySelectionDomain>
>             </StringVectorProperty>
>
> Everything seems to show up as expected, but I end up getting the following
> error:
>
> "had to make up a value for selection"
>
> How can I provide a default for the selection?
>
> Thanks,
> Brian Panneton
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20110325/679c5970/attachment-0001.htm>


More information about the ParaView mailing list