[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

How to build a Cháchara?

A Cháchara can be created by instantiation from a source definition file. The source definition file is a file that define image contents from scratch. Usially have a file extension of '.chachara'.
The file contents is composed of smalltalk source chunks and some directives to include another files.
The most common expresion to instantiate a Cháchara is like:
     ImageManager @ 'MMTest'.

To save the Cháchara to a '.image' file the message #outputToFile must be sent.
...There is more ways to build an image.

To create an empty Cháchara and add contents by hand, an ImageManager can be used.
The convenience of using an image manager is that all options of debbuggin and browsing are accesible from GUI.

To open the manager on a new instance:
     ChacharaImageManager open.


To build (and store on disk) more that one image an expression like the following can be used:
  ChacharaImage buildAll: #(
	'ScratchPad' 'GDIRect' 'MMTest'
	'bytesLeft' '2ndChance' 'garbageCollect' 'Enums' 'vmStats'
	'Sample1' 'Sample2' 'Sample3' 'SimpleTest'
	'RemoteDebugger' 'WinInet' 'FractalPlants' 
	).


Also a manager can be opened on an image instantiated from file:
    ChacharaImageManager fromFileNamed: 'GDIRect.bigBang'.


Global Settings

Twoi settings are defined globally and can be changed with an expression like:
   FenixImage sourcePath: 'Chacharas;Chacharas\*;Chacharas\Goodies\*'.
    FenixImage outputPathName: 'Chacharas\Bin\'.


Instantiation Shortcut

Expression to build an image with inmediate inclusion of files
FenixRootClass reset.
ChacharaImageManager openOn:
(ChacharaImage
	named: 'Test'
	including: #(
		'Skeleton' 'Printf'
		'FFI' 'FFI-Examples-Win32'
		), { aClassOrMethod. }
	startup: ' My example. ')

RemoteDebug

See FenixExchangeModule comment.

Misc

To simulate the running of a Cháchara inside Squeak (only reccommended for low level debuggin if you cange something at core objects structure)
(InterpreterSimulator new openOn: 'Chacharas\bin\vmStats.image') test.