iXml v3.0a - craighuggins@hotmail.com 2000
-~= Natives in iXml =~-

Natives

There are standards to the ROOT.XML that are required in order to run with the iXml interpreter. This can be altered, but then the lookup functions implemented either natively or through script need to be altered to retrieve from the new layout or structure.

These functions are RunNative, FindClass, and FindMethod and at the moment these require the Xml's they are playing with to be of a certain layout.

FindClass expects classes to be stored in
<Root <get Definitions and thier subclasses lie directly within their super types node. It takes a Class name as a parameter and returns a Class Node or an Error Node.

FindMethod takes a Class Node as a parameter and returns the Method you are asking for. If it is not found within the current Class Node, it searches within the super's of this Class Node. This is my excuse for method. inheritence!

RunNative takes a Method Node and Parameters and tries to execute it. Every native function returns a Node of which will have a name and type that we can use to script and control further. Or perhaps an error is returned!.

The fourth main native function that must be implemented to have a minimal sufficient iXml for your os, is that of Interpret.

Interpret takes a This Node to work ON, a script to EXECUTE, and parameters to use from within the script. The Interpret method merely looks at its CURRENT This and the methods that are available to This Node and tries to execute the script directly upon the This Node. Remember here that super types of This's current Node type will be searched for the function you are looking for as well.

Because of this, generic functionality is given to the iXml Node type, and since all other Nodes defined in iXml, those predefined and the ones you define (don't have to), will all inherit this functionality. That is, all of iXml's, and all other Super types functions are available from your Node types!

To perform work on any Node, make the Node you want to manipulate to be This, and do something with it.

eg. print user object
<Root <get User debug

eg. 3tore 3 times 5 in User as an answer.
<Root <get User set (<new Number a 5 <calc "5*") debug

Setting the code lookup up in this manner enables you as the developers the ability to add extra instant native functionality of your own to iXml at any time, and then by associating your new native function with some Type in iXml you will be able to call it from script, or directly through the native functions that you as the developers have added yourselves.


Introduction