#540 closed enhancement (fixed)
Add context parameter to dojo.evalObjPath() (like dojo.lang.setObjPathValue() has it)
Reported by: | Owned by: | sjmiles | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Core | Version: | 0.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
/*
- Evaluate a string like "A.B" without using eval.
- By default the string will be tried to be found in the global
- namespace, but you can also give the context explicitly.
- Which is very helpful for example in the case of evaluating
- this for a local value:
- dojo.evalObjPath("env.window.open", false, this)
- This call passes the context (this) to the function, so the
- object is tried to be found in this.env.window.open in the
- object that called the function. *
- @param string The string to evaluate, ie. "myobj.name", it
- will return a reference to myobj.name
- @param boolean If true the object will be created if it
- doesn't exist.
- @param object The context to find the object in. */
dojo.evalObjPath = function(objpath, create, context)
Attachments (1)
Change History (4)
Changed 15 years ago by
Attachment: | bootstrap1.diff added |
---|
comment:1 Changed 15 years ago by
Milestone: | → 0.3release |
---|---|
Owner: | changed from anonymous to sjmiles |
Type: | defect → enhancement |
Version: | 0.2 → 0.3 |
comment:2 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
dojo.lang.getPathObjValue added to dojo.lang.extras
Note: See
TracTickets for help on using
tickets.
bootstrap1.diff