Object-Oriented Programming in T2D 1.0.0
by Bryan Edds · 03/04/2005 (7:36 am) · 33 comments
Download Code File
THIS RESOURCE IS DEPRECATED! Find the new 3.0 version HERE.
Well, here goes. Hopefully this will show exactly how to implement OO in T2D 1.0.0 without giving anyone problems.
It is advised that you back up all the files that require modification in this resource before making any changes. Try to follow the instructions as accurately as possible.
For easier copying and pasting of the code in this resource, do not copy and paste from this web page. Instead, use the attached OOInT2DScriptInstructions.txt file.
Here's the same instructions on this webpage for your quick veiwing conveniance.
In console/compileEval.cc starting on line 1047, replace this code -
In console/simBase.cc directly after this line of code on line 201 -
Now compile.
It is critical that you read and study the file that is attached to this resource call tsoo.cs. This is a script file that can be executed from the console which shows and explains many of the features of OO in T2D script in an example. Once you absorb the knowledge in that document, you'll be on your way to making object-oriented T2D classes and datablocks in no time.
Final Note: If anyone has any problems or I have gotten any line numbers wrong, please don't hesitate to tell me by e-mailing me at the e-mail address specified in my profile.
Thanks for trying out my OO-in-T2D-script extension resource.
THIS RESOURCE IS DEPRECATED! Find the new 3.0 version HERE.
Well, here goes. Hopefully this will show exactly how to implement OO in T2D 1.0.0 without giving anyone problems.
It is advised that you back up all the files that require modification in this resource before making any changes. Try to follow the instructions as accurately as possible.
For easier copying and pasting of the code in this resource, do not copy and paste from this web page. Instead, use the attached OOInT2DScriptInstructions.txt file.
Here's the same instructions on this webpage for your quick veiwing conveniance.
In console/compileEval.cc starting on line 1047, replace this code -
if(ns)
nsEntry = ns->lookup(fnName);
else
nsEntry = NULL;with this code -/////////////////////////////////////
// CODE MODIFIED BRYAN EDDS
/////////////////////////////////////
/*if(ns)
nsEntry = ns->lookup(fnName);
else
nsEntry = NULL;*/
if(ns)
{
nsEntry = ns->lookup(fnName);
// while we have not found a function entry...
while (!nsEntry)
{
// while there is a parent, set ns = to it, and try
// looking up the function again
if (ns->mParent)
{
ns = ns->mParent;
nsEntry = ns->lookup(fnName);
}
// if there are no more parents to search, the function
// cannot be found
else
{
nsEntry = NULL;
break;
}
}
}
else
{
nsEntry = NULL;
}
/////////////////////////////////////
// END CODE MODIFIED BRYAN EDDS
/////////////////////////////////////In console/simBase.cc directly after this line of code on line 201 -
mFieldDictionary = NULL;insert this code on a new line -
///////////////////////////////////// // CODE INSERTED BY BRYAN EDDS ///////////////////////////////////// mClassName = ""; mSuperClassName = ""; ///////////////////////////////////// // END CODE INSERTED BY BRYAN EDDS /////////////////////////////////////In the same file after this line of code on line 803 -
mNameSpace = getClassRep()->getNameSpace();insert this code on a new line -
/////////////////////////////////////
// CODE INSERTED BY BRYAN EDDS
// AND HAROLD "LABRAT" BROWN
/////////////////////////////////////
// parent = C++ Class StringTableEntry
StringTableEntry parent = getClassRep()->getNameSpace()->mName;
// objectName = name of instance
StringTableEntry objectName = getName();
// here we'll make sure that the instance name is not the same as
// the classname, superclassname, or parent name. If it is, we'll con-
// catenate the word "Instance" to the end of the name.
if(objectName)
{
if(mClassName)
{
if(dStricmp(mClassName, objectName) == 0)
{
int chars = 0;
while(objectName[chars] != 0) ++chars;
char * tempStr = new char[chars + 10];
dStrcpy(tempStr, objectName);
tempStr = dStrcat(tempStr, "Instance");
objectName = StringTable->insert(tempStr);
delete [] tempStr;
}
}
if(mSuperClassName)
{
if(dStricmp(mSuperClassName, objectName) == 0)
{
int chars = 0;
while(objectName[chars] != 0) ++chars;
char * tempStr = new char[chars + 10];
dStrcpy(tempStr, objectName);
tempStr = dStrcat(tempStr, "Instance");
objectName = StringTable->insert(tempStr);
delete [] tempStr;
}
}
if(parent)
{
if(dStricmp(parent, objectName) == 0)
{
int chars = 0;
while(objectName[chars] != 0) ++chars;
char * tempStr = new char[chars + 10];
dStrcpy(tempStr, objectName);
tempStr = dStrcat(tempStr, "Instance");
objectName = StringTable->insert(tempStr);
delete [] tempStr;
}
}
}
// it's possible that all the namespace links can fail if
// multiple objects are named the same thing with different script
// hierarchies.
// linkNamespaces will now return false and echo an error message
// rather than asserting.
// if superClass was used then change parent to the proper NameSpace
// else leave parent = "SimObject"
if(mSuperClassName && mSuperClassName[0])
{
// walk = SuperClass's NameSpace
Namespace *walk = Con::lookupNamespace(mSuperClassName);
// prnt = "SimObject" NameSpace
Namespace *prnt = Con::lookupNamespace(parent);
// insert the SuperClass Namespace into the StringTable
StringTableEntry mName = StringTable->insert(mSuperClassName);
// walk = its parent if walk has a parent and it is SuperClass
while(walk->mParent && walk->mParent->mName == mName)
walk = walk->mParent;
// if walk has a parent, and its parent is not "SimObject",
// then parent = "SuperClass" StringTableEntry
if(walk->mParent && walk->mParent != prnt)
parent = mSuperClassName;
// if walk doesn't have a parent or its parent is not SimObject
// link parent and SuperClass StringTableEntries
// if link is successful, parent = SuperClass StringTableEntry
else {
if(Con::linkNamespaces(parent, mSuperClassName))
parent = mSuperClassName;
}
}
// className -> superClassName
// if class was used then change parent to the proper NameSpace
// else leave parent = "SimObject"
if (mClassName && mClassName[0])
{
// walk = Class NameSpace
Namespace *walk = Con::lookupNamespace(mClassName);
// prnt = parent NameSpace
Namespace *prnt = Con::lookupNamespace(parent);
// mName = Class StringTable
StringTableEntry mName = StringTable->insert(mClassName);
// walk = its parent while
// it has a parent and its parent's name = Class StringTable
while(walk->mParent && walk->mParent->mName == mName)
walk = walk->mParent;
// if walk has a parent and it is not the parent NameSpace
// then parent = Class StringTableEntry
if(walk->mParent && walk->mParent != prnt)
parent=mClassName;
// else if walk has no parent or parent is the parent NameSpace
// then link the parent and Class StringTableEntries
// if the link was successful, parent = Class StringTableEntry
else {
if(Con::linkNamespaces(parent, mClassName))
parent = mClassName;
}
}
// objectName -> className
// if name of this instance exists
// link parent and objectName StringTableEntries
// if link is success, parent = objectName
if (objectName && objectName[0])
if(Con::linkNamespaces(parent, objectName))
parent = objectName;
// Store our namespace
mNameSpace = Con::lookupNamespace(parent);
/////////////////////////////////////
// END CODE INSERTED BY BRYAN EDDS
// AND HAROLD "LABRAT" BROWN
/////////////////////////////////////In the same file after this line of code SOMEWHERE AROUND line 1103 (sorry, I lost track)-Parent::initPersistFields();insert this code on a new line -
/////////////////////////////////////
// CODE INSERTED BY BRYAN EDDS
/////////////////////////////////////
addGroup("Classes", "Sim objects have the ability to inherit and have class information.");
addField("className", TypeString, Offset(mClassName, SimObject), "Class of object.");
addField("superClassName", TypeString, Offset(mSuperClassName, SimObject), "Superclass of object.");
// members "class" and "superClass" are retained to be backward compatible
// ScriptObject. Rather icky, but better than the alternative...
addField("class", TypeString, Offset(mClassName, SimObject), "Class of object.");
addField("superClass", TypeString, Offset(mSuperClassName, SimObject), "Superclass of object.");
endGroup("Classes");
/////////////////////////////////////
// END CODE INSERTED BY BRYAN EDDS
/////////////////////////////////////In the same file, on the very last line, insert this code -/////////////////////////////////////
// CODE INSERTED BY BRYAN EDDS
/////////////////////////////////////
ConsoleFunction(link, void, 4, 4, "(string class, string superClass, string parent)")
{
argc;
StringTableEntry className;
StringTableEntry superClassName;
StringTableEntry parent;
if(argv[1] && argv[1][0])
className = StringTable->insert(argv[1]);
if(argv[2] && argv[2][0])
superClassName = StringTable->insert(argv[2]);
if(argv[3] && argv[3][0])
parent = StringTable->insert(argv[3]);
// parent = C++ Class StringTableEntry
//StringTableEntry parent = getClassRep()->getNameSpace()->mName;
// it's possible that all the namespace links can fail, if
// multiple objects are named the same thing with different script
// hierarchies.
// linkNamespaces will now return false and echo an error message
// rather than asserting.
// if superClass was used then change parent to the proper NameSpace
// else leave parent = "SimObject"
if(superClassName && superClassName[0])
{
// walk = SuperClass's NameSpace
Namespace *walk = Con::lookupNamespace(superClassName);
// prnt = "SimObject" NameSpace
Namespace *prnt = Con::lookupNamespace(parent);
// mName = superClassName
StringTableEntry mName = superClassName;
// walk = its parent if walk has a parent and it is SuperClass
while(walk->mParent && walk->mParent->mName == mName)
walk = walk->mParent;
// if walk has a parent, and its parent is not "SimObject",
// then parent = "SuperClass" StringTableEntry
if(walk->mParent && walk->mParent != prnt)
parent = superClassName;
// if walk doesn't have a parent or its parent is not SimObject
// link parent and SuperClass StringTableEntries
// if link is successful, parent = SuperClass StringTableEntry
else {
if(Con::linkNamespaces(parent, superClassName))
parent = superClassName;
}
}
// className -> superClassName
// if class was used then change parent to the proper NameSpace
// else leave parent = "SimObject"
if (className && className[0])
{
// walk = Class NameSpace
Namespace *walk = Con::lookupNamespace(className);
// prnt = parent NameSpace
Namespace *prnt = Con::lookupNamespace(parent);
// mName = Class StringTable
StringTableEntry mName = className;
// walk = its parent while
// it has a parent and its parent's name = Class StringTable
while(walk->mParent && walk->mParent->mName == mName)
walk = walk->mParent;
// if walk has a parent and it is not the parent NameSpace
// then parent = Class StringTableEntry
if(walk->mParent && walk->mParent != prnt)
parent=className;
// else if walk has no parent or parent is the parent NameSpace
// then link the parent and Class StringTableEntries
// if the link was successful, parent = Class StringTableEntry
else {
if(Con::linkNamespaces(parent, className))
parent = className;
}
}
}
/////////////////////////////////////
// END CODE INSERTED BY BRYAN EDDS
/////////////////////////////////////In the file console/scriptObject.cc starting on line 17, replace this code -StringTableEntry mClassName; StringTableEntry mSuperClassName;with this code -
///////////////////////////////////// // CODE MODIFIED BY BRYAN EDDS ///////////////////////////////////// /*StringTableEntry mClassName; StringTableEntry mSuperClassName;*/ ///////////////////////////////////// // END CODE MODIFIED BY BRYAN EDDS /////////////////////////////////////In the same file on line 26, replace this line of code -
ScriptObject();with this code -
///////////////////////////////////// // CODE MODIFIED BY BRYAN EDDS ///////////////////////////////////// /*ScriptObject();*/ ///////////////////////////////////// // END CODE MODIFIED BY BRYAN EDDS /////////////////////////////////////In the same file starting on line 45, replace this code -
addGroup("Classes", "Script objects have the ability to inherit and have class information.");
addField("class", TypeString, Offset(mClassName, ScriptObject), "Class of object.");
addField("superClass", TypeString, Offset(mSuperClassName, ScriptObject), "Superclass of object.");
endGroup("Classes");with this code -/////////////////////////////////////
// CODE MODIFIED BY BRYAN EDDS
/////////////////////////////////////
/*addGroup("Classes", "Script objects have the ability to inherit and have class information.");
addField("class", TypeString, Offset(mClassName, ScriptObject), "Class of object.");
addField("superClass", TypeString, Offset(mSuperClassName, ScriptObject), "Superclass of object.");
endGroup("Classes");*/
Parent::initPersistFields();
/////////////////////////////////////
// END CODE MODIFIED BY BRYAN EDDS
/////////////////////////////////////In the same file starting on line 58, replace this code -ScriptObject::ScriptObject()
{
mClassName = "";
mSuperClassName = "";
}with this code -/////////////////////////////////////
// CODE MODIFIED BY BRYAN EDDS
/////////////////////////////////////
/*ScriptObject::ScriptObject()
{
mClassName = "";
mSuperClassName = "";
}*/
/////////////////////////////////////
// END CODE MODIFIED BY BRYAN EDDS
/////////////////////////////////////In the same file starting on line 75, replace this code -// it's possible that all the namespace links can fail, if
// multiple objects are named the same thing with different script
// hierarchies.
// linkNamespaces will now return false and echo an error message
// rather than asserting.
// superClassName -> ScriptObject
StringTableEntry parent = StringTable->insert("ScriptObject");
if(mSuperClassName[0])
{
if(Con::linkNamespaces(parent, mSuperClassName))
parent = mSuperClassName;
}
// className -> superClassName
if (mClassName[0])
{
if(Con::linkNamespaces(parent, mClassName))
parent = mClassName;
}
// objectName -> className
StringTableEntry objectName = getName();
if (objectName && objectName[0])
{
if(Con::linkNamespaces(parent, objectName))
parent = objectName;
}
// Store our namespace
mNameSpace = Con::lookupNamespace(parent);with this code -/////////////////////////////////////
// CODE MODIFIED BY BRYAN EDDS
/////////////////////////////////////
/*// it's possible that all the namespace links can fail, if
// multiple objects are named the same thing with different script
// hierarchies.
// linkNamespaces will now return false and echo an error message
// rather than asserting.
// superClassName -> ScriptObject
StringTableEntry parent = StringTable->insert("ScriptObject");
if(mSuperClassName[0])
{
if(Con::linkNamespaces(parent, mSuperClassName))
parent = mSuperClassName;
}
// className -> superClassName
if (mClassName[0])
{
if(Con::linkNamespaces(parent, mClassName))
parent = mClassName;
}
// objectName -> className
StringTableEntry objectName = getName();
if (objectName && objectName[0])
{
if(Con::linkNamespaces(parent, objectName))
parent = objectName;
}
// Store our namespace
mNameSpace = Con::lookupNamespace(parent);*/
/////////////////////////////////////
// END CODE MODIFIED BY BRYAN EDDS
/////////////////////////////////////In the file console/simBase.h after this line of code on line 449 -SimObject* nextIdObject;insert this code on a new line -
///////////////////////////////////// // CODE INSERTED BY BRYAN EDDS ///////////////////////////////////// StringTableEntry mClassName; StringTableEntry mSuperClassName; ///////////////////////////////////// // END CODE INSERTED BY BRYAN EDDS /////////////////////////////////////In the file gui/guiControl.cc starting on line 56, replace this code -
const char *name = getName();
if(name && name[0] && getClassRep())
{
Namespace *parent = getClassRep()->getNameSpace();
if(Con::linkNamespaces(parent->mName, name))
mNameSpace = Con::lookupNamespace(name);
}with this code -/////////////////////////////////////
// CODE MODIFIED BY BRYAN EDDS
/////////////////////////////////////
/*const char *name = getName();
if(name && name[0] && getClassRep())
{
Namespace *parent = getClassRep()->getNameSpace();
if(Con::linkNamespaces(parent->mName, name))
mNameSpace = Con::lookupNamespace(name);
}*/
/////////////////////////////////////
// END CODE MODIFIED BY BRYAN EDDS
/////////////////////////////////////Now compile.
It is critical that you read and study the file that is attached to this resource call tsoo.cs. This is a script file that can be executed from the console which shows and explains many of the features of OO in T2D script in an example. Once you absorb the knowledge in that document, you'll be on your way to making object-oriented T2D classes and datablocks in no time.
Final Note: If anyone has any problems or I have gotten any line numbers wrong, please don't hesitate to tell me by e-mailing me at the e-mail address specified in my profile.
Thanks for trying out my OO-in-T2D-script extension resource.
#2
03/05/2005 (12:57 am)
It IS a very powerful thing. OO Torque Script is, IMO, totally object-oriented because it allows you to program to an interface. It may not have all the extra features that C++ has like compiler-enforced member privacy and multiple inheritance, but it does everything an object-oriented language must do in order to be object-oriented; it allows the programmer to totally decouple his interface from his implementation. Programming to an interface instead of an implementation is the complete essence of object-oriented programming. Sure, other languages tack on conveniant features to their language's polymorphic framework - but it's not really necessary to fulfill the true requirements of OOP.
#3
Just a FYI the following could cause errors in certain situations
what would happen if objectName + "Instance" were greater than 270 chars?
would it be worth while to use TGE's dynamic buffer code?
03/07/2005 (8:18 pm)
Bryan,Just a FYI the following could cause errors in certain situations
char * tempStr = new char[270];
dStrcpy(tempStr, objectName);
tempStr = dStrcat(tempStr, "Instance");what would happen if objectName + "Instance" were greater than 270 chars?
would it be worth while to use TGE's dynamic buffer code?
#4
But I just did a test with calling a function in a namespace that is longer than 256 characters, and it worked. So I guess that mean that I'll have to change the code :)
EDIT: Code is now fixed and updated on this page and in the included instructions file.
03/08/2005 (10:27 am)
I didn't initially believe that errors were possible since I was pretty sure the maximum size of namespace names in Torque script was 256 characters. That's why I believed 270 characters is fine in all cases.But I just did a test with calling a function in a namespace that is longer than 256 characters, and it worked. So I guess that mean that I'll have to change the code :)
EDIT: Code is now fixed and updated on this page and in the included instructions file.
#5
Have fun!
03/08/2005 (11:28 am)
I have just added a few more files to the attached zip file. The new files are called 'classTemplate', 'singletonTemplate', and 'interfaceTemplate'. These files contain of 'generic' code which can be easily modified to make your own classes, singletons, and interfaces. To modify the file, simply follow the instructions at the top.Have fun!
#6
03/09/2005 (10:07 am)
Looks like you forgot to put the .txt file into the zip this time.
#7
I am wondering, what is the "linkage" business at the end of some of the templates? Is it deleting the create() function to disallow anymore of that class being created (for singleton behavior, maybe)?
Thanks for any clarifications.
03/09/2005 (11:25 am)
Seems really cool so far, though I've not had time to try it vigorously. I love OO design, so I'll probably love it. :)I am wondering, what is the "linkage" business at the end of some of the templates? Is it deleting the create() function to disallow anymore of that class being created (for singleton behavior, maybe)?
Thanks for any clarifications.
#8
The linkage business is actually a somewhat unfortunate thing. It has to do with the way namespaces are linked for hierachies of classes. Let's say we have a class called MyClass and a class derived from it called MySubClass. If we do not 'link' MyClass before creating a MySubClass, a MySubClass won't be instantiable. What 'link' does is simply create and delete one arbitray instance of an objeect when the script file is initially executed in order to make sure its namespace links up properly so that any class in the hierarchy can be instantiated in any order by the library user.
I really oughta to do some C++ modification to keep this from being necessary, but I'm not entirely sure how to approach this problem yet...
I'll probably be looking into it soon.
03/09/2005 (11:37 am)
Josh - Looks like I did forget the txt file - it's back in there now. :)The linkage business is actually a somewhat unfortunate thing. It has to do with the way namespaces are linked for hierachies of classes. Let's say we have a class called MyClass and a class derived from it called MySubClass. If we do not 'link' MyClass before creating a MySubClass, a MySubClass won't be instantiable. What 'link' does is simply create and delete one arbitray instance of an objeect when the script file is initially executed in order to make sure its namespace links up properly so that any class in the hierarchy can be instantiated in any order by the library user.
I really oughta to do some C++ modification to keep this from being necessary, but I'm not entirely sure how to approach this problem yet...
I'll probably be looking into it soon.
#9
03/09/2005 (12:18 pm)
Is it possible to subclass, for example, fxSceneWindow2D? :)
#10
03/09/2005 (1:05 pm)
Yes, every single object in T2D is subclassable with this resource.
#11
03/09/2005 (1:06 pm)
Okay, I just figured out how to make things link up without needing to create and delete and object. I added a link console function to do this. All resources in this file will be updated to reflect this shortly.
#12
This code just keeps getting better :)
03/09/2005 (1:55 pm)
Code is now updated to reflect the new, easy-link functionality.This code just keeps getting better :)
#13
A couple CRITICAL fixes have been added. It is HIGHLY recommended everyone update from this resource, including especially the attached files.
All you have to do to perform the critical update for this resource is to reapply all the code chenges in simBase.cc from a fresh install file. Also make sure to use the new attached .cs files and not the old ones.
I kinda destabilized things from my last submission when I added the easy-link functionality. But with this critical update, it should all be rock-solid.
Note - The major fix is in the .cs files where null was being passed into the link function. Do NOT pass null into link, instead pass "". Otherwise the parameter will be seen as a string which reads "null", and will cause bugs upon bugs.
03/09/2005 (6:46 pm)
CRITICAL UPDATE:A couple CRITICAL fixes have been added. It is HIGHLY recommended everyone update from this resource, including especially the attached files.
All you have to do to perform the critical update for this resource is to reapply all the code chenges in simBase.cc from a fresh install file. Also make sure to use the new attached .cs files and not the old ones.
I kinda destabilized things from my last submission when I added the easy-link functionality. But with this critical update, it should all be rock-solid.
Note - The major fix is in the .cs files where null was being passed into the link function. Do NOT pass null into link, instead pass "". Otherwise the parameter will be seen as a string which reads "null", and will cause bugs upon bugs.
#14
03/11/2005 (10:24 am)
Sweet. Thanks for this resource! I'm gonna give it a go.
#15
03/12/2005 (2:04 am)
*Ponders adding multiple inheritance...*
#16
I'm still in the process of learning torque script so those few examples you've included in the zip have been invaluble.
03/12/2005 (4:39 am)
Nice work. My project scripts look a whole lot more organised now :) I'm still in the process of learning torque script so those few examples you've included in the zip have been invaluble.
#17
Also, I have it so that I can call an all() function, and all my script code in the game (minus the main main.cs and common scripts) is totally reloaded - allowing me to refresh everything while in the middle of the game. To do that, you just have to make sure that you code your script files in a way that won't corrupt anything if a script is exec'd twice. For example, you can't have random code just floating around in a script file like this -
$globalFlag = false;
setupGlobalFlags();
Instead, you'll have to make it so code like this is run only the first time the script is exec'd like this -
if(!$globalFlagInit) {
$globalFlag = false;
setupGlobalFlags();
$globalFlagInit = true;
}
The link function does not need to be handled like this because it can be run over and over without affecting anything so long as its parameters are consistant.
And just to keep my code clean, I try to keep all the non-function code in my main.cs files. That way I don't have to hunt a bunch od script to find why a global variable is going crazy or whatever.
03/12/2005 (11:33 am)
It's a definite boon to project organization. I have my code base set up so all the script code in the game is exec'd up at the beginning of the program much like a C++ library. It's takes some rearranging, but its has definitely turned out to be worth it. Bascially I put all my exec's for my library files (like classes, interfaces, etc) in a file called 'lib.csl'. When the lib.csl is exec'd, all the library files in its folder are exec'd in the order of their dependancy (a MyClass file would be exec'd before a MySubClass file becuase the latter is dependant on the former).Also, I have it so that I can call an all() function, and all my script code in the game (minus the main main.cs and common scripts) is totally reloaded - allowing me to refresh everything while in the middle of the game. To do that, you just have to make sure that you code your script files in a way that won't corrupt anything if a script is exec'd twice. For example, you can't have random code just floating around in a script file like this -
$globalFlag = false;
setupGlobalFlags();
Instead, you'll have to make it so code like this is run only the first time the script is exec'd like this -
if(!$globalFlagInit) {
$globalFlag = false;
setupGlobalFlags();
$globalFlagInit = true;
}
The link function does not need to be handled like this because it can be run over and over without affecting anything so long as its parameters are consistant.
And just to keep my code clean, I try to keep all the non-function code in my main.cs files. That way I don't have to hunt a bunch od script to find why a global variable is going crazy or whatever.
#18
Warning: couldn't find class rep for dynamic class
unable to instantiate non-conobject class
Unable to find object: '0' attempting to call function ...
Any pointers as to where to look?
03/15/2005 (6:23 pm)
I added the resource and recompiled. When I run the release version it segfaults. When I run the debug version it executes, but I get a bunch of warnings. Unfortunately I can't seem to cut & paste from T2D and I haven't found the switch to enable output to the console. The errors are roughly like:Warning: couldn't find class rep for dynamic class
unable to instantiate non-conobject class
Unable to find object: '0' attempting to call function ...
Any pointers as to where to look?
#19
03/16/2005 (11:48 am)
Tim, it appears to me that you improperly applied the resource, but I'm not sure without seeing the script code where the warnings are popping up. Please e-mail me privately at bryanedds_yahoo_com and include the script code which generates the warnings.
#20
The OO script resource is working very well here and helping enormously with my project.
03/19/2005 (12:24 pm)
Okay, the problem is with Processor::init(), optimization, my system and the fact I hadn't built a vanilla release and naively assumed it would work.The OO script resource is working very well here and helping enormously with my project.

Torque Owner Matthew "Ashteth" Kee
Default Studio Name