Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7970673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:27:05+00:00 2026-06-04T07:27:05+00:00

I have a dojo define function like this one define([ // some param ]),function(foo,

  • 0

I have a dojo define function like this one

define([
    // some param
]),function(foo, bar, baz, fooz, ...){
    return{
        // some custom code
    }
}

I would like to access dynamically to my function args(foo, bar, …)

i know i could wrap it into var

foo : foo

and access it with

this[objectToCall].methodToRun();

in this example the calling should be

this.run('foo');

function run(objectToCall){ // foo    
    this[objectToCall].methodToRun(); // refer to foo
}

Is there a way to achieve this without wrapping it into a var ?

thx in advance

EDIT :

little step further
i could use arguments keyword.

function(foo, bar, baz, fooz, ...){
    var functionArguments = arguments;
    return{
        // some custom code
    }
}

but i can’t access the foo object with functionArguments['foo'];

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:27:07+00:00Added an answer on June 4, 2026 at 7:27 am

    found the solution :

    function(method){
        var len = functionArguments.length;
        for(var i = 0; i < len; i ++){
            if(typeof functionArguments[i] === "object")
                if(functionArguments[i].name == method)
                    functionArguments[i].test();
                }
    

    and added a name param in my object’s definition

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: dojo.declare(City, null, { constructor : function(cityid, cityinfo){ } }); dojo.declare(TPolyline,
I have a onsubmit dojo/method within a custom templated widget like so: try {
I have dojo bar chart. Onmouseover the bar i would like a hand cursor.
I have a custom widget, defined similar to this: dojo.declare('myWidget', [dijit._WidgetBase, dijit._Templated], { 'templateString':'<span>'
I have the following subclass, derived from ContentPane: define([ dijit/layout/ContentPane, dojo/_base/declare ], function (ContentPane,
I have Used Dojo 1.0, but I have some version related questions: When will
I have a Dojo Datagrid in one of my pages (which contains more content)
In jQuery I would do: var foo = jQuery(form); foo.each(function(){ this.find(.required).each(function(){...}) }) This would
I have been attempting to implement a custom dojo build to replace the dojo
I have a dojo layout with two content panes, each at 50% height, one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.