[vtk-developers] vtkCocoaRenderWindow qq

Francois Bertel francois.bertel at kitware.com
Thu Oct 2 11:47:51 EDT 2008


OK. So anybody currently using a vtkCocoaRenderWindow inside a GUI
will have its code broken, right?

In this case, I recommend to use additional #ifdefs and don't touch to
vtkCocoaRenderWindow.

if not, change the behavior and document this change in the class and
in this new FAQ section:

http://www.vtk.org/Wiki/VTK_FAQ#API_Changes_in_VTK_5.3


On Thu, Oct 2, 2008 at 11:20 AM, Sean McBride <sean at rogue-research.com> wrote:
> On 10/2/08 10:37 AM, Francois Bertel said:
>
>>Are talking about changing the vtkCocoaRenderWindow only or the
>>superclasses as well?
>
> Only vtkCocoaRenderWindow.
>
>>If it is only the vtkCocoaRenderWindow, it does not sound like a big
>>deal to me.
>>
>>The mechanism is to keep the existing methods and mark them as
>>obsolete with some macros defined in VTK/Common/vtkSetGet.h
>>
>>An example of this is VTK/Filtering/vtkViewport.h/cxx:
>>
>>AddProp() has been deprecated in favor of a new AddViewProp (to avoid
>>conflict with some Windows macros)
>>
>>vtkViewport.h:
>>
>>// Description:
>>  // @deprecated Replaced by vtkViewport::AddViewProp() as of VTK 5.0.
>>  VTK_LEGACY(void AddProp(vtkProp *));
>>
>>
>>vtkViewport.cxx:
>>
>>#ifndef VTK_LEGACY_REMOVE
>> void vtkViewport::AddProp(vtkProp* p)
>>{
>>  VTK_LEGACY_REPLACED_BODY(vtkViewport::AddProp, "VTK 5.0",
>>                           vtkViewport::AddViewProp);
>>  this->AddViewProp(p);
>>}
>>#endif
>
> The situation is a little different though.  In this case, Clinton is
> talking about 4 get/set method pairs in vtkCocoaRenderWindow that are
> all from vtkWindow.  These 4 method pairs would remain, but their
> behaviour would change.  No methods would be added or removed or
> renamed.  Foo() will do what Bar() did, and Bar will do what Foo() did, etc.
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng                 sean at rogue-research.com
> Rogue Research                        www.rogue-research.com
> Mac Software Developer              Montréal, Québec, Canada
>
>
>



-- 
François Bertel, PhD  | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
                      | Clifton Park NY 12065, USA



More information about the vtk-developers mailing list