Added warnings to Reader, fixed some bugs found that way

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@30 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-10-19 13:03:11 +00:00
parent 9f73e2e9dc
commit ba4785ac49
5 changed files with 30 additions and 5 deletions
+4
View File
@@ -20,6 +20,10 @@ Reader::Reader(const InputStreamP& input, String filename)
moveNext();
}
void Reader::warning(const String& msg) {
wxMessageBox((msg + _("\nOn line: ")) << line_number << _("\nIn file: ") << filename, _("Warning"), wxOK | wxICON_EXCLAMATION);
}
bool Reader::enterBlock(const Char* name) {
if (just_opened) moveNext(); // on the key of the parent block, first move inside it
if (indent != expected_indent) return false; // not enough indentation