Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#540 closed enhancement (fixed)

Add context parameter to dojo.evalObjPath() (like dojo.lang.setObjPathValue() has it)

Reported by: [email protected] Owned by: sjmiles
Priority: high Milestone:
Component: Core Version: 0.3
Keywords: Cc:
Blocked By: Blocking:



  • 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("", false, this)
  • This call passes the context (this) to the function, so the
  • object is tried to be found in in the
  • object that called the function. *
  • @param string The string to evaluate, ie. "", it
  • will return a reference to
  • @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)

bootstrap1.diff (1.5 KB) - added by [email protected] 16 years ago.

Download all attachments as: .zip

Change History (4)

Changed 16 years ago by [email protected]

Attachment: bootstrap1.diff added


comment:1 Changed 16 years ago by sjmiles

Milestone: 0.3release
Owner: changed from anonymous to sjmiles
Type: defectenhancement
Version: 0.20.3

comment:2 Changed 16 years ago by sjmiles

Resolution: fixed
Status: newclosed

dojo.lang.getPathObjValue added to dojo.lang.extras

comment:3 Changed 15 years ago by (none)

Milestone: 0.3release

Milestone 0.3release deleted

Note: See TracTickets for help on using tickets.