Ian,

Actually, it's an incomplete feature.

The story is that the ability to define multiple classes in one TCF was 
designed into the original TCF definition. This work was done mostly by 
Pervasive back in the last 90s. However the feature was never brought out in 
the Tango2000/Witango Development Studio, which was restricted to only a single 
class per TCF.

Fast forward to 2006 and work done on the rewritten Witango Development 
Studio/TeraScribe allows for multiple classes to be defined.

However, the work in the server was not complete when I took on development. I 
believe that the Create Object Action can access the second class, but 
@CREATEOBJECT cannot. I've actually known about this shortcoming all along. Why 
haven't I fixed it? Well the simple answer is that I haven't decided if 
enforcing the "one class per file" rule is something the platform should do. 
The GUI of TeraScribe provides a reasonable mechanism to manage multiple 
classes per file - by creating a cache of all classes, regardless of file and 
presenting those classes in a clean way. But TeraScribe isn’t that advanced, 
and the standard reasons for "one class per file" remain. See here: 
http://stackoverflow.com/questions/469887/how-many-classes-should-a-programmer-put-in-one-file

And so, the feature has neither been completed nor removed.

I suggest that you limit your TCFs to only one class for now.

Robert

PS. I'd enjoy hearing your thoughts on this topic as it's one I've considered 
for years and have had very little input on.


-----Original Message-----
From: Ian Evans [mailto:ia...@ubookstore.com]
Sent: Tuesday, January 13, 2015 5:30 PM
To: TeraScript-Talk@terascript.com
Subject: TeraScript-Talk: multiple classes in a single tcf

Hello again,

When creating a TCF in TeraScribe, it's possible to define multiple object 
classes and their methods. Instantiating separate objects in a TAF from the 
classes defined in the TCF works just fine.

However, say you have a TCF with Class1 and Class2. Class1 was the first class 
defined in the TCF, and Class2 was the second class defined. Each has a method 
that just returns some text in returnValue, nothing complex.

Your TAF file instantiates each class (the order they are instantiated doesn't 
matter.) Calling a method from Class1 works just fine. Calling a method from 
Class2 causes TeraScript to throw a -806 error ("unspecified method call")

Changing the TAF file to only instantiate Class2 and call its method yields the 
exact same results.

Am I just not understanding how classes are supposed to operate, or is this a 
bug?

Thanks,
-Ian



----------------------------------------

To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.




----------------------------------------

To unsubscribe from this list, please send an email to lists...@terascript.com 
with "unsubscribe terascript-talk" in the body.

Reply via email to