Wed Jun 9 14:52:40 EDT 1999 .
Moved all my stuff into the center today and began work in earnest.
Found out a couple of days ago that the default build instructions will not build a threadsafe version of the JavaScript engine, just my luck ;(.
The Netscape docs are vauge about how to get multithread code to build.
This much I have figured out by pure brute force, trial && error.
1) The contents of nsprpub/pr/include should be placed in js/src Note: The directory structure the nsprpub directories must be preserved.
2) Look in nsprpub/pr/include/md/ for a file name of the form _<platform>.cfg where platform is the platform you are building for (eg _win95.cfg).
3) copy the file to js/src and rename it prcpucfg.h 3) copy the file to js/src and rename it prcpucfg.
At this point all files required for the threadsafe version of the JavaScript engine compile without warnings or errors, they however do not link. Microsoft Visual C++ complains about unresolved externals.
I think I may have to look at the included makefiles in order create a MSVC++ project that will build a nsprpub.lib to be added to the JavaScript project.

Thu Jun 10 11:23:30 EDT 1999 Got the module to compile without warnings or errors.
Did a dry run with the non threadsafe build of the library module, which of course failed to load successfully.
Thu Jun 10 22:02:05 EDT 1999 Good news. After looking over netscapes makefile for nsprpub (need it to make the JS Engine threadsafe), I found out I should be able to build MSVC++ compatible targets with netscape's build tools.

Mon Jun 14 16:12:42 EDT 1999 .
Okay some headway.
After scrounging around makefiles and readmes found out from mozilla.org nsprpub can use cl.exe, microsofts c/c++ compiler, the underlying engine for for Microsoft Visual C++, to build.
Ran into major problems using cl.exe, for one thing it does not seem to be able to find standard include files.
Will try to find and look up MSVC++ doc's.

Wed Jun 16 09:14:33 EDT 1999 .

Wooo Hooo

Got NSPR to build yesterday and have instructions for building it added to the readme.
Much thanx to Rob.
Of course my code compiled without warning and crashed in much the same manner.
Spent the rest of yesterday inserting statements that write "Im 'here' now" to a log file to find out what makes and what breaks.

Thu Jun 17 09:00:46 EDT 1999 .
The module absolutely does not work. The method that initializes the neat tools objects in the javascript environment fails without fail.
Quickly wrote a version of the module that has no dependencies on Neat Tools, and wrote a command line interpreter to test the object.

Sat Jun 19 00:28:23 EDT 1999 .
The test code JSObjTest seems stable and I havent been able to make it crash. The JavaScript end of the module looks to be stable and working.
The Module on the other hand refuses to load in Neat Tools.
Just completed the "Im 'here' now" thingy. A couple of runs seem to indicate the problem, I think I need to rewrite the copy constructor.
Rewrote default constructor and added a copy constructor.

!!!YES!!!

The module now loads without error, jserror.log shows that nothing breaks, jserror.txt agrees. One problem though the module does not display in Neat Tools.
I'll have to either rewrite paint() or add more repaint() methods to the code.

Tue Jun 22 09:00:21 EDT 1999 .
I've got to get back into making 'daily logs' daily.
The JavaScript module is acting up. It loads fine but when you try to place it in the Neat Tools environment it sort of disappears. The 'Im here now' logs show its size as being -7 by -7. Nothing else seems to be broken. After trying a host of other things I'm going to rewrite the module without the javascript and start putting the stuffing in the turkey bit by bit.

I've figured it out.
JModuleObjects 'clone()'ing works using the default copy constructor C++ provides if none is specified. I basically need to call inherited class JModuleObj's copy constructor before I do anything else in JScriptObj's copy constructor.

Wed Jun 23 19:18:36 EDT 1999 .
It works!!!! Well not really ;) The javascript side is ok.
There are some issues about modules requesting output when no input has been recieved by the JS module Also I think I goofed up cos the module thinks its a single input, single output module instead of a multiple input, single output module.

Thu Jun 24 23:08:15 EDT 1999 .
Inputs fixed.
Proof of concept is complete. (see Initial Proposal).
Took the day off.

Modules current state:
Inputs:
Two integer inputs one from left side other from top

Outputs:
One integer output from right side

Properties:
Script file name, module color

Behaviour:
Executes a script specified as a property of the module.
The script has access to both the inputs and outputs of the module.
So to implement an integer adder

module.output=module.input[0]+module.input[1];

is saved to a file, and the file is specified as the property of a loaded script module.
Note:
The module displays the name of the script currently being run.
If there is a problem loading the sript, an asterix appears after the name of the script.
Syntax and other such error are appended to a log jserror.txt
Thu Jul 1 08:28:48 EDT 1999 .
Long time no log.
I've been looking long and hard at the mozilla source to see how they implement object embedding with their javascript engine. I sort of cheated with my implementation. I generated code snipets on the fly that updated the input and output objects when input and output events occured. In order to have more control of the module I have to create javascript objects with the JS API, hence my browsing the mozilla source.

Sun Aug 15 16:58:30 EDT 1999 .
It's been a while.
Ive been a able to create a C++ class , JSArray, that wraps javascript arrays. C++ 'sees' elements of the array as being of type jsval (jsvals are used to point at any javascript object from C much like a poor mans polymorphism). Another class, JSDoubleArray now inherits from the JSArray class. It converts doubles to jsdoubles to jsvals when setting elements and converts jsvals to jsdoubles to doubles when fetching elements, returning 0.0 if the jsval does not point to a jsdouble or a type that cannot be converterd to a jsdouble.

Using these utility classes I currently have this setup.

Global Javascript Environment:
Modules Javascript environment: Module

IM ENDING THE LOGS HERE
FURTHER DOCUMENTATION WILL BE IN THE FORM OF A USRES GUIDE AND A PROGRAMMERS GUIDE