T3D1.2: Converting ConsoleMethod to DefineEngineMethod
by Gibby · in Torque 3D Professional · 01/29/2012 (8:10 am) · 22 replies
Greets all...
I'm trying to update some exisitng source code to T3D 1.2 as well as writing new code, and want to change all instances of the soon-to-be-deprecated ConsoleMethod to DefineEngineMethod. Can anyone explain the differences in the format of the two, and how to convert?
Thanks in advance...
I'm trying to update some exisitng source code to T3D 1.2 as well as writing new code, and want to change all instances of the soon-to-be-deprecated ConsoleMethod to DefineEngineMethod. Can anyone explain the differences in the format of the two, and how to convert?
Thanks in advance...
#22
ConsoleMethod/ConsoleFunction are the old-style binding methods. They don't perform any type conversions, you just get an argv[] list of function parameters straight from the console stack. The only advantage is they can handle a variable number of parameters which is useful for stuff such as echo.
02/15/2015 (1:50 pm)
DefineEngineMethod/DefineConsoleMethod is the new-style binding helper which allows you to bind functions with automatic type conversions, much like most modern binding libraries. DefineConsoleMethod only exists in the console system, while DefineEngineMethod also has a binding to the engine API (this is however IMO mostly useless except perhaps for generating docs).ConsoleMethod/ConsoleFunction are the old-style binding methods. They don't perform any type conversions, you just get an argv[] list of function parameters straight from the console stack. The only advantage is they can handle a variable number of parameters which is useful for stuff such as echo.
Azaezel