Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Localizing Large Numbers of Variables in a DynamicModule:

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85691] Localizing Large Numbers of Variables in a DynamicModule:
  • From: Ron Monson <ron.monson at yahoo.com>
  • Date: Tue, 19 Feb 2008 02:01:41 -0500 (EST)

X-Wrienvfrom: <mathgroup-adm at smc.vnet.net>
X-Wrienvto: <onkars at wolfram.com>
X-Wrienvto: <emre at wolfram.com>
X-Wrienvto: <roberto at wolfram.com>
X-Wrienvto: <mauricios at wolfram.com>
X-Wrienvto: <xwen at wolfram.com>
X-Wrienvto: <chrisw at wolfram.com>
X-Wrienvto: <darreng at wolfram.com>
X-Wrienvto: <ericb at wolfram.com>
X-Wrienvto: <brenton at wolfram.com>
X-Wrienvto: <l-mathgroup at wolfram.com>
X-Wrienvto: <layland at wolfram.com>
X-Wrienvto: <fredm at wolfram.com>
X-Wrienvto: <klarson at wolfram.com>
X-Wrienvto: <carlson at wolfram.com>
X-Wrienvto: <dkapadia at wolfram.com>
X-Wrienvto: <jasonh at wolfram.com>
X-Wrienvto: <pratikd at wolfram.com>
X-Wrienvto: <marykab at wolfram.com>
X-Wrienvto: <stevec at wolfram.com>
Received-SPF: none (mx1.wolfram.com: mathgroup-adm at smc.vnet.net does not designate permitted sender hosts) receiver=mx1.wolfram.com; client-ip=66.193.208.85; helo=smc.vnet.net; envelope-from=mathgroup-adm at smc.vnet.net; x-software=spfmilter 0.97 http://www.acme.com/software/spfmilter/ with libspf2-1.0.0;
X-PMX-Version: 5.3.3.310218, Antispam-Engine: 2.5.2.313940, Antispam-Data: 2008.2.18.230906
X-PerlMx-Spam: Gauge=XXXXXIIIIIIII, Probability=58%, Report='RDNS_SUSP! 2, RDNS_SUSP_FORGED_FROM 3.5, FORGED_FROM_YAHOO 0.1, SUPERLONG_LINE 0.05, BODY_SIZE_800_899 0, RDNS_GENERIC_POOLED 0, RDNS_SUSP_GENERIC 0, __FRAUD_419_WEBMAIL 0, __FRAUD_419_WEBMAIL_FROM 0, __FROM_YAHOO 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __SANE_MSGID 0'

I'm wondering if anyone can see a shorter way of  localising a large number of variables within a DynamicModule? For example,  instead of 
DynamicModule[{x1,x2,x3,x4,x5},
oo[x1,x2,x3,x4,x5];
oo[x1,x2,x3,x4,x5]
;
something with an idiom along the lines of 
args={x1,x2,x3,x4,x5};
DynamicModule[args,
oo[args];
oo[args]

The motivation for this is that in constructing a complex  interface the number of varfiables and functions may get quite large and further,  these variables may also need to be accessed in another function that is nested  more deeply . For example, function foo may call other functions which in  turn call other functions ... until finally the bottom function may need to  access say the variable - x1. Having to  repeatedly pass the entire or selected parts of  the variable space can get unwieldy and impact on the final code's  readability. Thanks.


  • Prev by Date: Re: 5 plots in 1 eps file??
  • Next by Date: Re: Mathematica Book and Documentation
  • Previous by thread: Re: importing data from Excel to Mathematica
  • Next by thread: Re: Localizing Large Numbers of Variables in a DynamicModule: