Squeak API Library question from a Newbie

Alejandro F. Reimondo alereimondo at sugarweb.com
Mon Feb 23 21:13:54 UTC 1998


I think that you are using an old VM interpreter with the last version of the API .st files.
Provably you have a conflict between VM interpreter version and Smalltalk code.
Steps to be done for a secure building of API framework:

0.- Download the API framework from http://www.sugarweb.com/miniatures/files/sqApi13.zip
1.- Start your favourite (clean) image.
2.- FileIn the file: API FileMeIn.txt
3.- Save the image.
Now you have included all the Smalltalk changes; but you must rebuild the virtual machine to include primitive services.
4.- Build the interpreter source file evaluating:
VirtualMachineSourceBuilder current plugAll;deleteFile;translate
>>>*WARNING*
  The new interpreter source file will be saved with name Interp.c
  and C project MUST be changed to compile this interpreter file
  and NOT the original file!
  (it can be the source of your problem)
>>>

5.- Be sure that you include all the source files in your project to compile the VM.
verify the inclusion of: interp.c and: sqWin32API.c
6.- Compile the VM.
7.- Run the new VM with the last saved image.
8.- Evaluate startUp expressions each time you restart the image.
ExternalHandle startUp. CallBack startUp.
9.- Now you can evaluate the test scripts.

Notes on preceding topics:
1.- Be sure that you does not mix framework versions. API framework has been refactored and is not secure to fileIn new version over and old.
2.- Can take a looong time on some machines.
3.- Save the image with the test script window open.
7.- You can compile and debug placing a breakpoint in the primitive 241 to see what is happening. Place the breakpoint in C source code in file interp.c function: primitiveExternalFunctionService()

Hope this points on rebuilding the VM will help you.
Feel free to post me if you have more questions.
Ale.


----------
Desde: 	Dave Anderson[SMTP:deandrsn at uiuc.edu]
Enviado el: 	Lunes 23 de Febrero de 1998 12:34
Para: 	squeak at cs.uiuc.edu
Asunto: 	Squeak API Library question from a Newbie

I will happily admit that I am a squeak Newbie.

That said:

I am trying to get Alejandro F. Reimondo's API library to work.
I have tried the 1.23 version (which comes with a sq.exe binary).
But I keep running into doesNotUnderstand messages when
GetModuleHandle was being called on KernelDLL.  While trying
to figure out that problem, I ran across the post that a 1.3 version
was available.  So I grabbed that version and, since it did not come
with a binary, proceeded to compile in the sqWin32API code (with
the 1.3 windows source of course).

However, after I file in the API st files, I try to initialize the libraries
with
ExternalHandle startUp.

Now, instead of getting a doesNotUnderstand.  I get a primitive failure,
which is happening when primitive 241 gets called with an argument of
2, which is calling the GetModuleHandle code.

Has anyone run into this problem.

Any help would be greatly appreciated.

Dave Anderson
cs225ta1 at cs.uiuc.edu





More information about the Squeak-dev mailing list