Button Question

*To*: mathgroup at smc.vnet.net*Subject*: [mg84319] Button Question*From*: John <jwa0 at lehigh.edu>*Date*: Wed, 19 Dec 2007 04:10:50 -0500 (EST)

The cell, pasted below, is in my notebook. When the cell is evaluated, It prints a button, labeled simulate, but clicking on the button does not print the six simulated integers that RandomInteger computed. The error message says that the list of probabilities, entered as shown below, is not a probability distribution recognized by the system, but {1/6,1/6,1/6,1/6,1/6,1/6} is a valid multinomial distribution. ButtonEvaluator, not mispelled, is printed in red. The color red must be an indication of an error of some kind, but I have no idea what it is. Cell[ButtonBox["Simulate", Active -> True, ButtonFunction -> Print[RandomInteger[ MultinomialDistribution[ 100, {"1", "/", "6", "1", "/", "6", "1", "/", "6", "1", "/", "6", "1", "/", "6", "1", "/", "6"}], 1]], ButtonEvaluator -> Automatic] // DisplayForm, "Output"], In one example, I saw, the arrow between ButtonFunction and Print is short and preceded by a colon. If if that notation is necessary, I don't know how to do it. Helpful advice will be appreciated . John

**Follow-Ups**:**RE: Button Question***From:*"Ingolf Dahl" <ingolf.dahl@telia.com>