All the methods that get combined can still use this function. For example, getChildren() and getChildrenRecursive(). By simply adding a recursive flag to getChildren(), the two can be combined. So, a warning can be placed on what would be a deprecated getChildrenRecursive() like so:<br>
<br>KX_KetsjiEngine::ShowDeprecationWarning("getChilrenRecursive()", "getChildren(1)");<br><br>-Mitchell "Moguri" Stokes<br><br><div class="gmail_quote">On Tue, Dec 16, 2008 at 11:24 PM, Dalai Felinto <span dir="ltr"><<a href="mailto:dfelinto@gmail.com">dfelinto@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I like this idea but we may need another function call slightly different.<br>
<br>
For example we have getDistance() (give you the distance), getVectTo()<br>
(give you the vector and the distance) and MathUtils that allow you to<br>
get the same data.<br>
IMHO it would be nice to centralize these calls (right now if we run a<br>
`print dir(obj)` we have so much functions that I found myself<br>
confused`)<br>
<br>
Another example(from the top of my head) could be the RayCast and<br>
RayCastTo. Could you unify them as well?<br>
<br>
Therefore I suggest to also create ShowDeprecationWarning(STR_String).<br>
The ShowDeprecationWarning(STR_String, STR_String) being used for<br>
general cases, and the other one for more specific ones.<br>
<br>
my 2 cents,<br>
(I didn't look to the patch though)<br>
<br>
Dalai Felinto<br>
<a href="http://blenderecia.orgfree.com" target="_blank">http://blenderecia.orgfree.com</a><br>
<br>
<br>
2008/12/16 Mitchell Stokes <<a href="mailto:mitchell@daboys4u.com">mitchell@daboys4u.com</a>>:<br>
<div><div></div><div class="Wj3C7c">> >From the tracker<br>
> (<a href="https://projects.blender.org/tracker/index.php?func=detail&aid=18097&group_id=9&atid=306" target="_blank">https://projects.blender.org/tracker/index.php?func=detail&aid=18097&group_id=9&atid=306</a>):<br>
><br>
> "In order to clean up the BGE Python API, me and cyborg_ar needed a way to<br>
> tell users that they were using a deprecated<br>
> function and should use another one.<br>
><br>
> Just put this into a deprecated function:<br>
> KX_KetsjiEngine::ShowDeprecationWarning("old way", "new way");<br>
><br>
> For example:<br>
> KX_KetsjiEngine::ShowDeprecationWarning("getPosition()", "position<br>
> property");<br>
><br>
> Will print "Method getPosition() is deprecated, please use the position<br>
> property instead" to the console.<br>
><br>
> The warnings can be turned off with Game -> Ignore Deprecation Warnings."<br>
><br>
> -Mitchell "Moguri" Stokes<br>
</div></div>> _______________________________________________<br>
> Bf-committers mailing list<br>
> <a href="mailto:Bf-committers@blender.org">Bf-committers@blender.org</a><br>
> <a href="http://lists.blender.org/mailman/listinfo/bf-committers" target="_blank">http://lists.blender.org/mailman/listinfo/bf-committers</a><br>
><br>
><br>
_______________________________________________<br>
Bf-committers mailing list<br>
<a href="mailto:Bf-committers@blender.org">Bf-committers@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/bf-committers" target="_blank">http://lists.blender.org/mailman/listinfo/bf-committers</a><br>
</blockquote></div><br>