Jenya,

Look at vtkSMNewWidgetRepresentationProxy::ExecuteEvent. It fires
events when one interacts with the widget. You can add observers for
those events.

As far as documentation for such things goes, the source code if your
best guide -- attaching debugger and back tracking to determine why
that error is being thrown serves as a good starting point.

Utkarsh




On Tue, May 25, 2010 at 4:32 PM, Jenya Burstein <taijin...@gmail.com> wrote:
> Utkarsh,
>
> Thanks again, that worked.
>
> Now that the widget shows and can be interacted with I need to register an
> oberver with it. I am not sure how to do that, since, again, I don't see any
> command properties defined for it in the XML resource file.
>
> And another question - where or how would I find the information that, for
> example a widget has to be added to a view before it can be enabled,  so
> that I wouldn't be bugging others with my posts to the mailing list? Is
> there a documentation or a set of examples?
>
> Jenya
>
> On Tue, May 25, 2010 at 12:09 PM, Utkarsh Ayachit
> <utkarsh.ayac...@kitware.com> wrote:
>>
>> Make sure you are changing the enabled state after the widget has been
>> added to the view i.e. after the following code:
>>
>>  pqSMAdaptor::addProxyProperty(
>>        m_renderView->getProxy()->GetProperty("Representations"),
>> sliceWidget)
>> m_renderView->getProxy()->UpdateVTKObjects();
>>
>> Utkarsh
>>
>> On Tue, May 25, 2010 at 2:57 PM, Jenya Burstein <taijin...@gmail.com>
>> wrote:
>> > Utkarsh,
>> >
>> > Thank you for the response. I think that moved me one step closer to the
>> > solution.
>> >
>> > However, now I get the following runtime error in the Output window:
>> > ERROR: In ..\..\..\VTK\Widgets\vtkAbstractWidget.cxx, line 119
>> >
>> > vtkImplicitPlaneWidget2 (000000000D01C8C0): The interactor must be set
>> > prior
>> > to enabling the widget
>> >
>> >
>> >
>> > I don't see an "Interactor" property defined in the XML file for the
>> > ImplicitPlaneWidgetRepresentation and I get a zero pointer if I try to
>> > get
>> > it with:
>> >   vtkSMProperty* p = sliceWidget->GetProperty("Interactor");
>> >
>> > Jenya
>> > On Tue, May 25, 2010 at 11:39 AM, Utkarsh Ayachit
>> > <utkarsh.ayac...@kitware.com> wrote:
>> >>
>> >> pqSMAdaptor::setElementProperty(sliceWidget->GetProperty("Enabled"),
>> >> 1);
>> >
>
>
_______________________________________________
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

Reply via email to