Skip to content

Function not found in customer PropertyBag #522

Answered by ClearScriptLib
ZelgiusLiu asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @ZelgiusLiu,

From the IPropertyBag documentation (emphasis added):

If an object that implements this interface is added to a script engine (see AddHostObject), script code will be able to access the properties stored in the collection as if they were members of the object itself, using the script language's native syntax for member access. No other members of the object will be accessible.

The idea is to eliminate potential ambiguity. In C#, indexing and member access are distinct operations, whereas in JavaScript they're exactly the same – e.g., values['Print'] is 100% equivalent to values.Print – and ClearScript has no way to determine whether you're trying to access a member named…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ZelgiusLiu
Comment options

@ClearScriptLib
Comment options

Answer selected by ZelgiusLiu
@ZelgiusLiu
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants