<div dir="ltr">Hi David,<div><br></div><div>It's apparent to me that part of the difficulty surrounding this change is</div><div>due to the name of the method.  Why not use a new name?</div><div><br></div><div>bool ComputeBoundsForViewport(vtkViewport *, double bounds[6]);</div><div><br></div><div>I confess that I have an ulterior motive.  I like all Get() or Set() methods</div><div>to get/set a property that depends only on the the object itself.  Here,</div><div>the Bounds depend on both the object and on a second object.  So I</div><div>don't consider this method to be a "getter" in the strict sense, hence</div><div>"ComputeBounds" rather than "GetBounds".</div><div><br></div><div>Basically, I like it when Get methods are associated with properties/traits</div><div>of the object.  Eventually, VTK's wrappers might associate Set/Get</div><div>methods with Python properties.  In fact, this idea can already be seen</div><div>in action in tvtk, Enthought's Traited VTK.</div><div><br></div><div> - David</div><div><br></div><div><br></div><div><div class="gmail_extra"><div class="gmail_quote">On Mon, Mar 23, 2015 at 9:18 AM, David Lonie <span dir="ltr"><<a href="mailto:david.lonie@kitware.com" target="_blank">david.lonie@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5">On Fri, Mar 20, 2015 at 9:42 AM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div>On Fri, Mar 20, 2015 at 7:17 AM, David Lonie <span dir="ltr"><<a href="mailto:david.lonie@kitware.com" target="_blank">david.lonie@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Thu, Mar 19, 2015 at 5:54 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><span>On Thu, Mar 19, 2015 at 2:28 PM, David Lonie <span dir="ltr"><<a href="mailto:david.lonie@kitware.com" target="_blank">david.lonie@kitware.com</a>></span> wrote:<br></span><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">2) If so, how can I teach the wrappers about it?<br></div></blockquote></span></span><span><span><div><br></div></span><div>Adding things like this to Tcl is easier than for Java or Python, but it's more than an afternoon's work.</div></span></div></div></div></blockquote><div><br></div><div>One more thing:</div><div><br></div><div>If you know offhand, can you briefly outline the steps that are needed to do this? That might help clarify whether the maintenance burden is excessive or not. Would it be a one-time deal that would teach Tcl how to wrap all similar methods, or would it need to be repeated for every similar method that gets added?</div></div></div></div></blockquote><div><br></div></div></div><div>My brief outline is this: find the code in vtkWrapTcl.c that builds arrays to be used as return values, and then do something similar for this new kind of method signature, except have it assign a global name (whatever name was passed as a parameter) to the new array instead of returning it.  If it is done for this method, it should work for all similar methods.</div></div></div></div></blockquote><div><br></div></div></div><div>This seems more doable than I'd feared, since it'd be a generic approach that should "just work" for similar cases.</div><div><br></div><div>It sounds like there's a lot of support for removing Tcl, but it's unlikely that we'll see it go away completely anytime soon for a multitude of reasons. So back to the immediate issue of how the GetBounds change can be made to work with the wrappers, I see three options:</div><div><br></div><div>1) Train the wrappers to understand it. Might not be worth the effort if we're planning to pull support soon.</div><div><br></div><div>2) Add an additional non-deprecated GetBounds signature</div><div><br></div><div>double* GetBounds(vtkViewport*)</div><div><br></div><div>I don't like this approach as it has issues thread safety, and requires each object to carry around an array just to pass results back to a caller -- a pattern we should be moving away from. I'd be more supportive of this approach if we decided to use vtkTuple<double, 6> instead of double*, but this would also be likely to require some significant wrapper training and/or concrete vtkTuple subclasses.</div><div><br></div><div>3) Begin a long-term deprecation of Tcl. We'll not plan on removing it completely anytime soon, but enabling Tcl wrapping will also require enabling legacy code in VTK. This way the old legacy GetBounds, etc signatures will still be available to Tcl, and feedback from the deprecation would help us understand the full impact of completely removing Tcl, as we'll grab the attention of users that might not follow the mailing lists.</div><div><br></div><div>My vote is for 3 -- it's an easy change that gives people a heads-up about then inevitable future removal of Tcl support, and ensures that everything will "just work" for legacy code until we decide to completely pull the plug.</div><div><br></div><div>Thoughts? Votes? Alternatives?</div><div><br></div><div>Dave</div></div></div></div>
</blockquote></div><br></div></div></div>