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

MathGroup Archive 2010

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

Search the Archive

Re: Customizing Manipulate's Autorun

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110665] Re: Customizing Manipulate's Autorun
  • From: John Fultz <jfultz at wolfram.com>
  • Date: Thu, 1 Jul 2010 08:27:12 -0400 (EDT)

On Thu, 1 Jul 2010 07:24:20 +0200, Ingolf Dahl wrote:
> Here is a second comment on John Fultz's comments on my letter:
>
>> From: John Fultz [mailto:jfultz at wolfram.com]
>>
>> snip
>>
>> Second, there is a much easier technique for making a hidden control.
>> Manipulate supports this directly using the ControlType option.  E.g.,
>>
>> Control[{{t, 0}, 0, 4*Pi, Pi/12, ControlType -> None}]
>>
>> There are several examples in the Manipulate documentation which
>> highlight
> this
>> usage.
>>
>> Sincerely,
>>
>> John Fultz
>>
> When I read this, I thought I must have missed something in the
> documentation. So I became a little bit finicky and checked the
> documentation. This is what I have found, relating Control and
> ControlType:
>
> On the "Control Objects" page: " Control -- an interactive control with
> type automatically chosen", and ControlType is not mentioned.
>
> On the " Controls Options" page: ControlType is not mentioned.
>
> On the "Control" page, "opts" is mentioned as a possible argument with
> the comment " use the specified control options". But then no possible
> option are specified or used in the examples.
>
> On the "ControlType" page: "ControlType is an option for Manipulate and
> related functions that specifies what type of controls should be
> displayed". Please be specific and tell the names of the "related
> functions"! It is not easy to understand that Control is a related
> function, while Manipulator is not. Or can ControlType be given as option
> to Manipulator?
>
> In the "Introduction to Manipulate" and the "Advanced Manipulate
> Functionality": Neither Control nor ControlType is mentioned, as far as I
> have found when I scanned through. Have I missed some place?
>
> Finally, at the "Manipulate" page, both Control and ControlType are
> mentioned, and it is stated "ControlType options can be given separately
> for each variable. Options for the controls can also be given within the
> specification for the variables." This was what I missed.
>
> It is not explicitly stated, but I guess that it is so, that the argument
> of Control should have the same form as the specification of a variable
> for Manipulate. A variable for Manipulate is considered as an variable
> for Manipulate even if it is wrapped by a Control statement. Are there
> any examples of Manipulate using Control as argument? Control has also an
> own life outside Manipulate, but then ControlType->None does not seem to
> be an option.
>
> So I do not think I am unfair if I describe the use of Control with the
> option ControlType->None as an "undocumented, or poorly documented
> feature". One thing that might be clarified is what the difference is
> between the setting {{u,0}, None} and {{u,0}, ControlType->None} or
> setting u == 0 in the Initialization option.
>
> Ingolf Dahl

This example would have worked without Control.  My use was superfluous, and I
included it principally because your example included it.  So, this syntax does
the same thing...

     {{t, 0}, 0, 4*Pi, Pi/12, ControlType -> None}

I will certainly concede that the documentation has weaknesses, some of which
have been pointed out ad nauseum on this forum.  Drawing specific conclusions
about the usefulness of ControlType->None is among them.  But the usage of the
ControlType option to customize individual Manipulate variables is really quite
prominently documented on the Manipulate reference page and the Introduction to
Manipulate tutorial.

However, in my hurry to dash off a response, I probably would have been more
tentative about ControlType->None specifically being documented if I hadn't
misinterpreted some examples in my haste.  I don't think I would say now that
there are "several examples" documenting this (there is one, but it's not
anyplace you would think to look, and does not demonstrate why this is useful). 
I would say that you can connect the dots for using None as a ControlType, but
concede that the dots may not be so easy to connect.  I apologize for suggesting
otherwise.

Speaking of Control[] generally, I noticed a number of months ago that Control[]
is pretty under-documented given its import.  It's an incredibly powerful,
useful, and easy-to-use construct for putting together Manipulates with
customized interface appearances.  While the core information to do this is
generally available (except curiously, as you point out, the fact that Control
exactly analogizes Manipulate variable syntax), too much is left to the reader
to infer rather than spelled out in a clear and useful way.  That will be fixed. 
And I'll look into dealing with ControlType->None in the documentation as well.

Sincerely,

John Fultz
jfultz at wolfram.com
User Interface Group
Wolfram Research, Inc.


  • Prev by Date: Re: A modified StyleSheet results in FontSize fluctuations in the pdf
  • Next by Date: Re: A modified StyleSheet results in FontSize fluctuations in the pdf
  • Previous by thread: Re: Customizing Manipulate's Autorun
  • Next by thread: Re: precedence for ReplaceAll?