Page MenuHome

[patch] A patch to add KX_KetsjiEngine::ShowDeprecationWarning()
Closed, ArchivedPublic

Description

In order to clean up the BGE Python API, me and cyborg_ar needed a way to tell users that they were using a deprecated function and should use another one.

Just put this into a deprecated function:
KX_KetsjiEngine::ShowDeprecationWarning("old way", "new way");

For example:
KX_KetsjiEngine::ShowDeprecationWarning("getPosition()", "position property");

Will print "Method getPosition() is deprecated, please use the position property instead" to the console.

The warnings can be turned off with Game -> Ignore Deprecation Warnings.

Event Timeline

applied. Thanks Moguri

Dalai Felinto (dfelinto) changed the task status from Unknown Status to Archived.Apr 2 2009, 9:16 AM