On Thu, 22 May 1997 20:12:09 -0400 (EDT) Pierre Phaneuf pp@gulliver.qc.ca wrote:
I just checked out the new bpcompat sources... Did anyone actually *USED* the OBJECTS.PAS unit???
Yes - see; TESTOBJ.PAS TESTCOLL.PAS TESTSTRM.PAS
More specifically, the TStream Put and Get methods?
Yes - see; TESTSTRM.PAS
They are obviously broken...
They worked okay in my tests. See the procedure "TestPut" in TESTSTRM.PAS. Can you post a copy of the code that is broken?
BTW: it is stated clearly that TStream and some of the other objects are not complete - so, if anyone wants to implement the missing bits, please feel free to do so!
Ok, so those are difficult parts, but still... What I need is two things: a way to tell what is the real type of an object like the typeof() function (didn't check if it was there), and a way to construct an object of an type as returned by typeof().
It isn't there - but you could write it :-). We would greatly welcome all contributions to the bpcompat package!
Best regards, The Chief Dr Abimbola A. Olowofoyeku (The African Chief, and the Great Elephant) Author of: Chief's Installer Pro v3.50 for Win16 and Win32. Homepage: http://ourworld.compuserve.com/homepages/African_Chief/ E-mail: laa12@cc.keele.ac.uk
On Fri, 23 May 1997, The African Chief wrote:
They are obviously broken...
They worked okay in my tests. See the procedure "TestPut" in TESTSTRM.PAS. Can you post a copy of the code that is broken?
The problem is that TStream.Put simply write off the image of the object without any type information. So if you Put a TCollection, the object you'll read with Get won't be necessarily a TCollection. If GPC works like TP, it has the type of the object in the 2 or 4 first bytes of the object, but this is compile-dependent. If you add a class or add methods in another class, the type bytes on the streams won't match those in the executable and the file will be useless.
BTW: it is stated clearly that TStream and some of the other objects are not complete - so, if anyone wants to implement the missing bits, please feel free to do so!
Of course! Peter says the features needed to implement the TStream object correctly is now in GPC, so I'll get the latest version and work on this!
It isn't there - but you could write it :-). We would greatly welcome all contributions to the bpcompat package!
I send you the update! Shouldn't take more than a few days (download and install the newest GPC and do the changes)...
Pierre Phaneuf
"The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense." - Edsger W. Dijkstra.