Пример #1
0
void ScriptEditor_init (ScriptEditor me, Editor environment, const char32 *initialText) {
	if (environment) {
		my environmentName = Melder_dup (environment -> name);
		my editorClass = environment -> classInfo;
	}
	TextEditor_init (me, initialText);
	my interpreter = Interpreter_createFromEnvironment (environment);
	theReferencesToAllOpenScriptEditors. addItem_ref (me);
}
Пример #2
0
void ScriptEditor_init (ScriptEditor me, Editor environment, const char32 *initialText) {
	if (environment) {
		my environmentName = Melder_dup (environment -> name);
		my editorClass = environment -> classInfo;
	}
	TextEditor_init (me, initialText);
	my interpreter = Interpreter_createFromEnvironment (environment);
	if (! theScriptEditors) {
		theScriptEditors = Collection_create (nullptr, 10).transfer();
	}
	Collection_addItem_ref (theScriptEditors, me);
}
Пример #3
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);
}