Thanks for this helpful answer Alex, I'll probably start working on this
tonight.
Two question are left for now:
1)
The TypeDef is a class that holds methods that represents the JS API.
My understanding is that there's no code implemented for each particular
method on AS3 side.
We just implement the method signatures to be able call the 'origin' JS
functions through AS3.
Those empty AS3 TypeDef method bodies confuses me: How does it work that a
call of such a method calls the JS counterpart at the end without any
implementation on AS3 side?
Maybe I got something wrong.
2)
If we outsource the JS API to ace.js which is the TypeDef and we would like
to provide its methods through the ACEEditor.as class. What is the best way
to achieve this?`
If we create e.g. a public var 'editor' in ACEEditor.as which holds the ace
instance the usage would be a bit ugly [1]:
[1] Implementation and usage:
// Implementation
package {
import ....ace;
public class ACEEditor()
{
public var editor:ace;
public function ACEEditor() {
// Wherever the id comes from, maybe we have to create a
surrounding div at first here?
this.editor = ace.edit(id);
}
}
}
// AS3 Usage
var aceEditor:ACEEditor = new ACEEditor();
aceEditor.id = foo;
// I guess this should not the goal
aceEditor.editor.setTheme(ace.THEME_MONOKAI);
Thanks,
Olaf
--
Sent from: http://apache-royale-development.20373.n8.nabble.com/