Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Expression for manipulate controls

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110661] Expression for manipulate controls
  • From: EliL <elansey at gmail.com>
  • Date: Thu, 1 Jul 2010 08:26:28 -0400 (EDT)

I am trying to generate a set of Manipulate controls based on the
contents of some lists.  For example, say I have lists:
school = {"rynj", "bpy", "moriah", "yavneh", "noam"}
schoolName = {"RYNJ", "BPY", "Moriah", "Yavneh", "Noam"}

Then, I'd like my Manipulate controls to be:
In[508]:= Table[{{ToExpression[
    StringJoin[ToLowerCase[schoolsC[[n]]], "Q"]],
   schools[[n]]}, {ToExpression[ToLowerCase[schoolsC[[n]]]] -> True,
   Null -> False}}, {n, 1, Length[schools]}]

Out[508]= {{{rynjQ, "RYNJ"}, {rynj -> True, Null -> False}}, {{bpyQ,
   "BPY"}, {bpy -> True, Null -> False}}, {{moriahQ,
   "Moriah"}, {moriah -> True, Null -> False}}, {{yavnehQ,
   "Yavneh"}, {yavneh -> True, Null -> False}}, {{noamQ,
   "Noam"}, {noam -> True, Null -> False}}}

But without that outer { }, since Manipulate controls need to be ,
{control1},{control2},etc, not, {{control1},{control2},etc}.

Any ideas how to do this?
TIA


  • Prev by Date: ReadList with system command problem ?
  • Next by Date: Re: Lauching application from an icon
  • Previous by thread: ReadList with system command problem ?
  • Next by thread: Re: Lauching application from an icon