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.

]]>

3 Commentsto runScript doesn’t work well (if at all?) with script paths.

  1. Anonymous says:

    < ![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.

    ]]>

  2. Anonymous says:

    < ![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)

    ]]>

  3. Anonymous says:

    < ![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”.

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *