[vtkusers] Problems with vtkTkRenderWidget
hhiraki at lab.nig.ac.jp
hhiraki at lab.nig.ac.jp
Fri Jan 17 09:23:43 EST 2003
Hello Jose,
I have found some problems on destroying a vtkTkRenderWidget
in Tcl/Tk on linux, too. Though they may not be same as yours,
I hope these workarounds help you.
1. "[$renWin GetInteractor] Delete" is required if the
vtkGenericRenderWindowInteractor is created implicitly in
::vtk::bind_tk_render_widget.
2. "$renWin MakeCurrent" is sometimes required (maybe when
the vtkRenderWindow is created implicitly in the widget).
3. "rename $widget {}" is required as "destroy $widget" is
not enough to remove the command.
# Hello Sebastien,
# I think vtkRenderWindow and vtkGenericRenderWindowInteractor
# shouldn't be settable parameters but be integrated parts of
# vtkTkRenderWidget sharing their lives with the widget.
# How do you think?
Hideaki Hiraki
From: jose beotegui <jmbeotegui at yahoo.es>
Subject: [vtkusers] Problems with vtkTkRenderWidget
Date: Fri, 17 Jan 2003 13:40:06 +0100 (CET)
> Hi,
>
> I'm using VTK 4.0 and Tcl/Tk on Windows.
> I have done an interface using Tk and I've used a vtkTkRenderWidget
> to render a volume and I've packed altogether.
> I wish to destroy only the vtkTkRenderWidget but appears
> a message like this:
> "A TkRenderWidget is being destroyed before it
> associated vtkRenderWindow is destroyed. This is very bad and usually
> due to the order in which objects are being destroyed.
> Always destroy the vtkRenderWindow before destroying the user
> interface components".
>
> But I've destroyed that vtkRenderWindow before.
> How can I resolve it?
>
> Thanks in advance.
>
> Code example
>
>
> wm withdraw .
> toplevel .visor
> frame .visor.f1
> vtkTkRenderWidget .visor.f1.video -width 400 -height 400 -rw renWin
>
> pack .visor.f1.video -fill both -expand t
> pack .visor.f1 -fill both -expand t
>
> renWin Delete
> destroy .visor.f1.video
>
>
> ---------------------------------
> Yahoo! Móviles
> Personaliza tu móvil con tu logo y melodía favorito
More information about the vtkusers
mailing list