Ejemplo n.º 1
0
void ScriptEditor_init (ScriptEditor me, Editor environment, const char32 *initialText) {
	if (environment != NULL) {
		my environmentName = Melder_dup (environment -> name);
		my editorClass = environment -> classInfo;
	}
	TextEditor_init (me, initialText);
	my interpreter = Interpreter_createFromEnvironment (environment);
	if (theScriptEditors == NULL) {
		theScriptEditors = Collection_create (NULL, 10);
		Collection_dontOwnItems (theScriptEditors);
	}
	Collection_addItem (theScriptEditors, me);
}
Ejemplo n.º 2
0
void structScriptEditor :: init (Editor environment, const wchar_t *initialText) {
	if (environment != NULL) {
		environmentName = Melder_wcsdup (environment -> name);
		editorClass = environment -> classInfo;
	}
	structTextEditor::init (initialText);
	interpreter = Interpreter_createFromEnvironment (environment);
	if (theScriptEditors == NULL) {
		theScriptEditors = Collection_create (NULL, 10);
		Collection_dontOwnItems (theScriptEditors);
	}
	Collection_addItem (theScriptEditors, this);
}