On 7/1/11 4:35 PM, HMark wrote:
Thank you for the quick reply, Jason.So if I understand your proposed solution, then in the following case, you'll be able to specify that when any of the operations buttons is clicked, BOTH sliders n1 and n2 will be read and sent to the server, if the syntax is modified, and the checkbox, unless qualified with an update, will behave as it currently does? ------------------- original ---------------------- @interact def logarithmic_ops( n1 = slider(1, 10, 0.5, 4.0, label='n1:'), n2 = slider(1, 10, 0.5, 5.0, label='n2:'), operation = ['Reset', 'Multiply', 'Divide'], show_linear_ruler = checkbox(default=false, label='Show linear ruler:') ): ------------ modified ---------------------- @interact def logarithmic_ops( n1 = slider(1, 10, 0.5, 4.0, label='n1:', update=False), n2 = slider(1, 10, 0.5, 5.0, label='n2:', update=False), operation = button(['Reset', 'Multiply', 'Divide'], update=['n1', 'n2']), show_linear_ruler = checkbox(default=false, label='Show linear ruler:') ): This approach could work, assuming that it will be applicable to ALL other controls, not just button, like for example: @interact def point_setting( n_points_i = input_box(default = 4, label = 'number of points:', width = 5, update=False), user_slope = input_box(default = 0, label = 'Your estimated slope:', width = 5, update=False), user_offset = input_box(default = 0, label = 'Your estimated offset:', width = 5, update=['n_points_i', 'user_slope']), show_calculations = checkbox(default = false, label = 'Show least squares calculations:'), show_best_fit = checkbox(default = false, label = 'Show best fit:') ): where only when user_offset is modified, does it grab the values of n_points_i and user_slope and sends it to the server for evaluation. Hope it makes sense, and definitely appreciate the effort!
Yes, you have the idea behind the current direction. Any suggestions? Thanks, Jason -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
