On Fri, Mar 28, 2008 at 4:21 PM, William Stein <[EMAIL PROTECTED]> wrote:
> On Fri, Mar 28, 2008 at 4:02 PM, Robert Miller <[EMAIL PROTECTED]> wrote:
>  > You've definitely laid the groundwork here, maybe I'll be one of the
>  >  people to try to improve it. Here's an example session, I think it
>  >  illustrates the two things I'm thinking about. Feel free to respond at
>  >  whatever level you like, I'd just like to get one of these two
>  >  approaches to work:
>  >
>  >  {{{
>  >  s = 0
>  >  @interact
>  >  def _(ltr = selector(['a', 'b', 'c', 'd'], nrows=1), element=''):
>  >     #s += 1
>  >     element += ltr
>  >     print element
>  >  }}}
>  >
>  >  If you do it with the commented line in, you can see how I can't
>  >  actually hit buttons to change the text in 'element'. You've already
>  >  indicated you know what I mean there, but if you uncomment the s += 1
>  >  line, you get an "s is not defined" error. You can define functions,
>  >  because that's what the easter egg widget does...
>
>  Just put
>    global s
>  before the "s += 1" line.
>
>  William
>


By the way, it would be very interesting to include
interact examples with Sage standard, with a nice
menu to select from them from within the Sage notebook.
There are some obvious challenges associated with doing
this, but they are worth tackling:
   * how to test that things work
   * how to organize what we include
   * ???

 -- William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to