made a start with script functions

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@62 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-10-31 12:17:36 +00:00
parent 0caaf01a78
commit 1ffaa5bd58
20 changed files with 372 additions and 29 deletions
+2
View File
@@ -23,6 +23,7 @@ ScriptValueP ScriptValue::getMember(const String& name) const
{ throw (typeName() + _(" has no member '") + name + _("'")); }
ScriptValueP ScriptValue::next() { throw InternalError(_("Can't convert from ")+typeName()+_(" to iterator")); }
ScriptValueP ScriptValue::makeIterator() const { throw ScriptError( _("Can't convert from ")+typeName()+_(" to collection")); }
int ScriptValue::itemCount() const { throw ScriptError( _("Can't convert from ")+typeName()+_(" to collection")); }
void ScriptValue::signalDependent(Context&, const Dependency&, const String& name) {}
ScriptValueP ScriptValue::dependencies( Context&, const Dependency&) const { return script_nil; }
@@ -167,6 +168,7 @@ class ScriptString : public ScriptValue {
throw ScriptError(_("Not a number: '") + value + _("'"));
}
}
virtual int itemCount() const { return (int)value.size(); }
private:
String value;
};