Maybe this is an obvious question, but I wanted to get some feedback on the best practice for writing out tag paths in scripts or bindings in an application - specifically with respect to the use of the “[default]” portion of the tag path. I’m using Perspective v8.0.14 if that matters. I want to make sure the path we choose aligns with the vision of the developer.
We have been putting the “[default]” everywhere - in scripts, direct tag bindings, indirect tag bindings, etc. From what I can tell that isn’t really necessary. If you browse to tag with a direct tag binding you get it for free and it really isn’t an issue, but for indirect tags (whether by binding or using a script that has system.tag.readBlocking(['[default]'+view.params.ItemPath])
its extra typing we could avoid.
Here is how it looks now:
Apart from being more typing and text it can cause the binding or readBlocking not to work if someone were to parameterize the “ItemPath” with the “[default]” included. This happens easily if someone does copy tag path.
In this case the bindings using ItemPath won’t work if they have [default] already added to them as shown above.
We are trying to set up some standard objects that can be reused by other designers in any application that require the least amount of work to use. We originally (perhaps incorrectly) made sure to have “[default]” be built into those standard objects so that individuals would not need to include that extra text when parameterizing the objects. I’m not sure if this has always been the case or if something has changed but it appears that if you are referencing a tag in the [default] folder there is no need to include “[default]” in bindings or scripts such as system.tag.readBlocking so our design like that is not necessary and as I mention above actually opens up the possibility of having issues if someone includes “[default]” in their parameterization. Lastly, while most of these standard objects would not reference the System tags, they wouldn’t be able to if we hard coded the [default] as well.
So, is there any downside to not including the “[default]” text like we were doing? This would likely result in most bindings and scripts not having “[default]” in them at all since people would be likely to not type it in. Is there any issue with having bindings or scripts like this?