runScript doesn’t work well (if at all?) with script paths.
runScript doesn’t work well (if at all?) with script paths. While it would be possible to add runScript with an additional argument for the path, I think it would be a good idea to add a run method to the script class instead. Reasoning: script names might not be unique at all, but a script object always represents a unique script.
]]>
< ![CDATA[
It worked only in V14b2 and removed the support for using the path in the name in V14b3, where I added an explicit version that takes the path. I was pretty sure that I made the function public (similar to getScriptByPathAndName) but I messed something because indeed it’s not there. Since the name can contain path separator, merging path and name in a single string is unsafe.
Yes, a run method on the script object would be natural.
]]>
< ![CDATA[
In context of “natural” methods: why are methods like clone, move, remove or zIndex part of the container class and not the item class? (delete could also be part of the script class)
]]>
< ![CDATA[
Because this is really the job of the container to manage its items. Yes these methods could be accessed from the item because it has a link to its parent, but really the container is responsible for these tasks, it has a greater “knowledge”.
]]>