On 24.03.2006 13:00, Neutral Robot Boy wrote: > ok, i've gotten back to work with the new csPython, and i need an > explanation of a couple of things: > i see that iScript::Initialize() is now deprecated. what i don't > understand is why. in fact, i can't quite track down where it's called.
'bool Initialize (iObjectRegistry*)' is also contained in iComponent and called after a plugin is loaded, to initialize the plugin. The iScript method was probably deprecated because it appears pretty much superfluous. > and while i'm on the > subject, is there someone out there who can offer help with switching > csPython from the scf macro's to the scf template functions? Hmm, afaics csPython uses the new SCF stuff already? > also, i'm at a stage now where i've implemented many of oktal's proposed > changes, and it would be nice to see all those overloaded functions in > iScript/iScriptObject get deleted, BUT: doing so seems to really badly > break cspyth.cpp, which is generated by swig. Perhaps check the python-specific swig files (ivaria/py*.i), maybe you can spot something you can fix blindly. > and lastly: > in the proposed method bool csPython::Store (const char *name, > csRef<iScriptValue> value) > csPython must have access to the literal value stored in the > iScriptValue, because it might be an object (value->GetXxx() could be > called in other cases, though getting to there is still clunky and > setting the literal value directly would be much quicker). obviously, > since this is a pointer to the interface, it is necessary to put > something in the interface that can do this. to that effect, i've added > void* iScriptValue::GetLiteral(), which returns a pointer to the > internal language-specific data type. That can be problematic if someone decides to pass in an iScriptValue from another lingo, accidentally or perhaps because a value is to be copied around. One way would be to make an interface "iPythonScriptValue" or so that contains a method to query Py-specific things. The scripting module would query for that interface if needed, and get the "literal" value if present, and bail out or try to make do with the data it has if it not present. -f.r.
signature.asc
Description: OpenPGP digital signature
