The keyword reminder text box now tries to run the script to see if it contains errors

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@932 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-06-01 01:29:13 +00:00
parent 5b47f6f498
commit 336726b16b
3 changed files with 33 additions and 7 deletions
+6 -1
View File
@@ -70,9 +70,11 @@ class KeywordTextValue : public FakeTextValue {
/// A FakeTextValue that is used to edit reminder text scripts
class KeywordReminderTextValue : public KeywordTextValue {
public:
KeywordReminderTextValue(const TextFieldP& field, Keyword* keyword, bool editable);
KeywordReminderTextValue(Set& set, const TextFieldP& field, Keyword* keyword, bool editable);
String errors; ///< Errors in the script
Set& set; ///< Set this keyword is in (for script checking)
Keyword& keyword; ///< The keyword we are the reminder text of
/// Try to compile the script
virtual void store();
@@ -81,6 +83,9 @@ class KeywordReminderTextValue : public KeywordTextValue {
/// Syntax highlight, and store in value
void highlight(const String& code, const vector<ScriptParseError>& errors);
/// Check the script for errors
bool checkScript(const ScriptP& script);
};
/// Changing the mode of a keyword