[Paraview] Displaying a List of Strings in a popup [ParaView 3]
Mike Jackson
imikejackson at gmail.com
Mon Jul 2 12:29:32 EDT 2007
Ok, so we tried this approach (vtkStringArrayHelper) but when we run
ParaView we get the following error:
ERROR: In \Development\ParaView3\Servers\ServerManager
\vtkSMProperty.cxx, line 449
vtkSMStringVectorProperty (040D0930): Could not create object of
type: vtkSMStringArrayHelper. Did you specify wrong xml element?
ERROR: In \Development\ParaView3\Servers\ServerManager
\vtkSMProperty.cxx, line 449
vtkSMStringVectorProperty (05490D60): Could not create object of
type: vtkSMStringArrayHelper. Did you specify wrong xml element
Is there some where we need to Register the vtkStringArrayHelper
class? or are we really barking up the wrong tree?
--
Mike Jackson Senior Research Engineer
Innovative Management & Technology Services
On Jun 28, 2007, at 11:56 AM, clinton at elemtech.com wrote:
>
> I don't see an example that does exactly what you want.
> But here's something that might work (untested).
>
> <StringVectorProperty
> name="PhaseNameInfo"
> command="GetPhaseList"
> information_only="1">
> <StringArrayHelper/>
> </StringVectorProperty>
>
> <StringVectorProperty
> name="PhaseName"
> command="SetPhase"
> number_of_elements="1">
> <StringListDomain name="operation">
> <RequiredProperties>
> <Property name="PhaseNameInfo" function="ArraySelection"/>
> </RequiredProperties>
> </StringListDomain>
> </StringVectorProperty>
>
> That's assuming your reader has a SetPhase function.
> The PhaseNameInfo is used to get the list of available strings, by
> calling
> GetPhaseList which returns a vtkStringArray.
> Note how the PhaseNameInfo is tied to the domain of the PhaseName
> property.
> The PhaseName property is used to set the selection on the reader.
> The GUI would give you a combo box to choose one string from a list.
>
> StringArrayHelper is new and doesn't exist in 3.0. You might be
> able to copy
> it from the CVS head, rename it and include it in your plugin.
>
> This approach might be easier in the long run, as you'll have less
> code to
> maintain yourself.
>
> Clint
>
> On Thursday 28 June 2007 8:15:23 am Mike Jackson wrote:
>> I am writing a plugin for ParaView 3 and I am going with the idea of
>> having ParaView 3 autogenerate the GUI for my Reader. (We are
>> prototyping at this point).
>> I need to retrieve a list of Strings from my Data File to display
>> to the user so the user can then select one of those string values. I
>> generally understand all the C++ code part. It is the Server Manager
>> XML that I am getting hung up on. I have been reading through the
>> ParaView book and looking through some of the XML files in ParaView 3
>> source code. It would seem I need something like:
>>
>> <StringVectorProperty
>> name="PhaseName"
>> command="GetPhaseList"
>> information_only="1">
>> <SimpleStringInformationHelper/>
>> </StringVectorProperty>
>>
>> I know I need some sort of Information Helper so something.. Could
>> someone shed some light or point me to an example? Whether the list
>> is in a popup or traditiional List box does not really matter. If it
>> can ONLY be done with a list of 'ints' I could hack something
>> together to make that work...
>>
>> Thanks
>> --
>> Mike Jackson
>> imikejackson & gmail * com
>>
>>
>>
>> _______________________________________________
>> ParaView mailing list
>> ParaView at paraview.org
>> http://www.paraview.org/mailman/listinfo/paraview
>
>
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
More information about the ParaView
mailing list