[Paraview] vtkClientServerStream::InsertArray(temp20,4)
Utkarsh Ayachit
utkarsh.ayachit at kitware.com
Sat Oct 23 18:34:44 EDT 2010
The wrapper auto-generated code is not related to the xml stuff at
all. The wrapper thinks it's expecting a 4-tuple as the return value
from GetWindices. Have you specified a "hints" file for this class so
that this method gets wrapped? If so you will have to fix the hints
file to indicate the return value is a 5-tuple. If not, what's the
signature of GetWindices in your header file?
Utkarsh
On Sat, Oct 23, 2010 at 5:29 PM, Favre Jean <jfavre at cscs.ch> wrote:
> Hi all
>
> I have the following definition for a home-made reader where I wish to pass 5 integers back to my python client.
>
> <IntVectorProperty
> name="Windices"
> command="GetWindices"
> number_of_elements="5"
> default_values="0 0 0 0 0"
> information_only="1">
> <SimpleIntInformationHelper/>
> </IntVectorProperty>
>
> The problem I have with both version 3.8.1 and 3.9 is that the auto-generated code gets written as:
>
> if (!strcmp("GetWindices",method) && msg.GetNumberOfArguments(0) == 2)
> {
> int *temp20;
> {
> temp20 = (op)->GetWindices();
> resultStream.Reset();
> resultStream << vtkClientServerStream::Reply << vtkClientServerStream::InsertArray(temp20,4) << vtkClientServerStream::End;
> return 1;
> }
> }
>
> i.e with an InsertArray(temp20,4) instead of what I wish to see, an InsertArray(temp20,5);
> 5, because I wish to pass an array of 5 values. If I modify the auto-generated code and replace 4 by 5, everything works inside my Python shell as expected.
>
> Have I made an error in my XML code, such that the auto-generated code fails to give me what I expect?
>
> TIA
> Jean
> _______________________________________________
> 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
>
More information about the ParaView
mailing list